The String islower() method returns True if the string is not empty and all the alphabet characters are lowercase. Otherwise, it returns False.
Syntax
my_string.islower()islower() Parameters
Python String islower() method does not take any parameters.
islower() Return Value
Python String islower() method returns:
Trueif all characters in the string are lowercase.Falseif the string does not contain at least one cased character or if the string contains at least one uppercase alphabetic character.
Examples
Example 1: Check if all characters in the string are lowercase
The islower() method returns True if all characters in the string are lowercase.
my_str = 'abcd'
result = my_str.islower()
print(result) # Output: Trueoutput
TrueThe method returns False, if the string does not contain at least one cased character.
my_str1 = '123$@%'
my_str2 = 'a123$@%'
print(my_str1.islower()) # Output: False
print(my_str2.islower()) # Output: Trueoutput
False
TrueThe method also returns False, if the string contains at least one uppercase alphabet.
my_str = '123A$@%'
print(my_str.islower()) # Output: Falseoutput
FalseExample 2: Check if an Empty String is lowercase
An empty string is not lowercase.
my_str = ''
print(my_str.islower()) # Output: Falseoutput
False