Python String islower() Method
The islower()
method checks whether all alphabetic characters in a string are lowercase.
Syntax
string.islower()
Parameters
No parameter.
Return Value
Returns True
if all alphabetic characters in a string are lowercase and there is at least one alphabetic character. Numbers, symbols, and whitespaces are ignored.
Returns False
otherwise (includes empty string and or string with no alphabetic character).
Examples
Check if a String is Lowercase
print("hello".islower()) # True
print("Hello".islower()) # False
print("HELLO".islower()) # False
print("hello123".islower()) # True
print("hello!".islower()) # True
print("123".islower()) # False (no letters)
print("".islower()) # False (Empty string)