小册名称:Python合辑2-字符串常用方法
15、islower()
判断字符串中的所有字母是否都为小写,是则返回True,否则返回False。
print('SIMPLE IS BETTER THAN COMPLEX'.islower()) # Falseprint('simple is better than complex'.islower()) # True
print('SIMPLE IS BETTER THAN COMPLEX'.islower()) # False
print('simple is better than complex'.islower()) # True