#Python中检测字符串是否只由小写字母组成islower()

32.(str).islower()
检测字符串是否只由小写字母组成。
#如果字符传中至少有一个字符(长度大于1) 且所有的字符都是小写字母返回True
,否则返回False

print("ABC".isupper())			#(输出)True
print("ABC1".isupper())			#(输出)False
print("ABC#".isupper())			#(输出)True
print("ABCa".isupper())			#(输出)True

猜你喜欢

转载自blog.csdn.net/weixin_43097301/article/details/82962790