当前位置:  首页>> 技术小册>> Python合辑2-字符串常用方法

15、islower()

判断字符串中的所有字母是否都为小写,是则返回True,否则返回False。

  1. print('SIMPLE IS BETTER THAN COMPLEX'.islower()) # False
  2. print('simple is better than complex'.islower()) # True