题解 | #统计字符#
统计字符
https://www.nowcoder.com/practice/539054b4c33b4776bc350155f7abd8f5
mystr=input() times=[0,0,0,0] for i in mystr: if i.isdigit(): times[2]+=1 elif i.isalpha(): times[0]+=1 elif i==' ': times[1]+=1 else: times[3]+=1 [print(i) for i in times]