Question: Python: Create a program that counts input length without including spaces, periods, or commas. Given a line of text as input, the program should output

Python: Create a program that counts input length without including spaces, periods, or commas. Given a line of text as input, the program should output the number of characters excluding spaces, periods, or commas.

Next create a function that will take as its argument, the string read from the user input. The function will then determine the number of characters as explained in Week 2 assignment and return this number.

**This is what I have from my week 2 assignment**

# import Regular expressions, sequence to find pattern or strings. import re

string = "That's a Great way to begin this sentance! Can we make the input louder!?!?!!"

# Filters out commas, periods, and spaces from the input. print (len("".join(re.findall (r'[A-Z0-9a-z]', string))) )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!