题解 | #统计字符#
统计字符
https://www.nowcoder.com/practice/539054b4c33b4776bc350155f7abd8f5
while True: try: s=input() # python 内置函数 alpha=list(map(str.isalpha,list(s))) space=list(map(str.isspace,list(s))) digit=list(map(str.isdigit,list(s))) print(sum(alpha)) print(sum(space)) print(sum(digit)) print(len(s)-sum(alpha+space+digit)) except: break