Python String - islower() Method
The Python islower() method is used to check whether all characters of the string are in lowercase or not. It returns true when all characters of the string are in lowercase, else returns false. Any symbol, space or number in the string is ignored while applying this method. Only Alphabet are checked.
Syntax
string.islower()
Parameters
No parameter is required.
Return Value
Returns True if all characters of the specified string are in lowercase, else returns False.
Example:
In the example below, islower() method checks whether all characters of the given string are in lowercase or not.
MyString = "Hello John" print(MyString.islower()) MyString = "hello john" print(MyString.islower())
The output of the above code will be:
False True
Example:
When the string contains any symbol, space, or number, it is ignored by the method. It only checks alphabet. Consider the following example.
MyString = "@hello world" print(MyString.islower())
The output of the above code will be:
True
❮ Python String Methods