統計分類字符數

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():
相關文章
相關標籤/搜索