几个字符串方法时间:2022-10-17 22:13:11 str.isdigit() 是否只由数字组成 str.isupper() 是否大写字母 str.islower() 是否小写字母 str.isalpha() 是否只由字母 str.count('a') a出现的次数