Answer:
text = input('Please enter a line of text')
text = text.replace(" ", "")
text = text.replace(".", "")
text = text.replace("!", "")
text = text.replace(",", "")
print(len(text))
Explanation:
line by line, the first line asks for input with a prompt.
the second line replaces spaces, the next one replaces periods, the next exclamation marks, the next commas. then the last line prints the total number of characters