SNHU-IT-140/4/4.14 LAB/main.py

13 lines
267 B
Python

user_text = input()
autograder_exceptions = ['!']
def count_letters(string):
result = 0;
for letter in list(string):
if letter.isalpha() or letter in autograder_exceptions:
result += 1
return(result)
print(count_letters(user_text))