Write a program to count the characters that are not words, integers, spaces
# get the string from the user
inputString =input("");
symbols=0
# Looping through a string.
for letter in inputString:
if (letter.isdigit()==False and letter.isalpha()==False and letter!=" "):
symbols+=1
# Display a new string.
print(f"The characters that are not words, integers, spaces: {symbols}")
Comments
Leave a comment