Here is an English article for you , How many spaces are there in you 、 Numeric character 、 English letters and other letters .
Enter multiline text , With EOF end
Each line represents a paragraph of an article
Output a line of message , See the example for the specific format .
Python is a good language.
We all like it.
7 spaces, 0 numbers, 32 letters, 3 other characters.
str=''
while(1):
try:
str=str+input()+'\n'
except:
break
number=0
letter=0
space=0
rest=0
for i in range(0,len(str)):
if(str[i].isdigit()):
number+=1
elif(str[i].isspace() & (str[i]!='\n')):
space+=1
elif(str[i].isalpha()):
letter+=1
else:
rest+=1
print(space, 'spaces,',number,'numbers,',letter,'letters,',rest-1,'other characters.')