家庭文摘网 逸家购物 2023新款宽广实业科学函数计算器大学生考试商务太阳能多功能计算
2023新款宽广实业科学函数计算器大学生考试商务太阳能多功能计算
    
  • 宝贝详情
  • |
  • 猜你喜欢
  • |
商品详情

解析: import string s=input('please input string:' letters✉0 space女0 digit =0 others =0 for ch in s: dx COMP #是否为字母 03 tan E if ch.isalpha0: DMS F/S DIR letters +=1 种是否为空格 ARG 8 IRI elif ch.isspace0: 9 space+=1 5 RCL 种是否为敬字 1 为 6 M+ elif ch.isdigito: 2 digit+=1 else: 0 3 others +=1 print(letters,space,digit,others) 选择判断语句 isalpha(0是否为字母 isspace0是否为空格 isdigit0是否为数字 04