统计分类字符数

letter,space,digit,other=0,0,0,0 s = input('input a string:\n') for c in s: if c.islower() or c.isupper(): letter +=1 elif c.isspace(): space +=1 elif c.isdigit():
相关文章
相关标签/搜索