统计字符:用s.isalpha(),s.isspace(),s.isdigit()可完成四种不同的统计 def countChar(string): alpha,space,number,qita = 0,0,0,0 for s in string: if s.isalpha(): alpha+=1 if s.isspace(): space+=1 if s.isdigit(): number+=1 if (s.isalpha()==False) and (s.isspace()==False) and (s.isdigit()==False): qita+=1 return (alpha,s...