No installations needed! Write Python directly in your browser and get instant feedback with our smart validation system.
Parse a sentence, remove punctuation, and count the number of words.
You are given a string variable named
Write a function
You must ignore punctuation characters such as
Words are separated by spaces.
Treat contractions like "don't" as one word.
Assume the input is a valid string.
Output:
Get your code reviewed and validated to understand what you did right and where you can improve.