In python 3.8:
print(len([x for x in input("Enter your text: ") if x not in "., "]))
I hope this helps!
5.9m questions
7.7m answers