Given a line of text as input, output the number of characters excluding spaces, periods, or commas. If the input is:
Listen, Mr. Jones, calm down. The output is 21

Respuesta :

In python 3.8:

print(len([x for x in input("Enter your text: ") if x not in "., "]))

I hope this helps!