all Python 3Strings (str)function
str.islower
character checks
True if all cased characters are lowercase and there is at least one.
Syntax
s.islower()
Caseless characters — digits, spaces, punctuation — are simply ignored, so 'abc123' is True while '123' and '' are False: at least one cased letter is required. Hence a common bug: not s.islower() does not mean "contains uppercase", it is also true for a string of digits alone.
Examples
print('abc'.islower()) # → True
print('Abc'.islower()) # → False
print('abc123'.islower()) # → True
See also
Open in the full glossarydocs.python.orgReport an inaccuracy