题解 | #统计字符#
统计字符
http://www.nowcoder.com/practice/539054b4c33b4776bc350155f7abd8f5
while True:
try:
s = input()
isal = 0
issp = 0
isdi = 0
other = 0
for i in s:
if i.isalpha():
isal+=1
elif i.isspace():
issp+=1
elif i.isdigit():
isdi+=1
else:
other+=1
print(isal,issp,isdi,other,sep='\n')
except:
break