输入一行字符,分别统计出其中英文字母,数字,空格,其它字符的个数。
输入格式
输入一行字符
输出格式
输出为一行,分别输出英文字母,数字,空格,其它字符的个数,用空格分隔
样例输入
aklsjflj123 sadf918u324 asdf91u32oasdf/.’;123
样例输出
23 16 2 4
s = input()
c = 0
n = 0
space = 0
other = 0
for i in s:
if'z'>=i>='a' or 'Z'>=i>='A':
c+=1
elif '9'>=i>='0':
n+=1
elif i==' ':
space+=1
else:
other+=1
print (c,n,space,other)