2.4输出字符传中的英文小写字符
str=input("输入一串字符:")
str_c=0#标识符不能用-
for c in str:
if "a"<=c.lower()<="z":
str_c=str_c+1
print("英文字符有{}个".format(str_c))
输入一串字符:
qsd1245
英文字符有3个
2.4输出字符传中的英文小写字符
str=input("输入一串字符:")
str_c=0#标识符不能用-
for c in str:
if "a"<=c.lower()<="z":
str_c=str_c+1
print("英文字符有{}个".format(str_c))
输入一串字符:
qsd1245
英文字符有3个