Python islower function is useful to check whether the given string has at least one character and whether the character is either in lowercase or not. If the character is lowercase, then it returns True. Otherwise, returns False.
In this section, let me show you how to write the string islower Function with an example, and the syntax is as shown below.
String_Value.islower()
- String_Value: Please select a valid literal.
Python islower string function example
The following set of examples helps you understand the islower function. Please refer to the Python String and the list of available Python string Methods articles on our Learn Python page to understand them.
Str1 = 'tutorial gateway';
print('First Output = ', Str1.islower())
# Performing directly on Alphabets
Str3 = 'python tutorial at Tutorial Gateway'.islower()
print('Third Output = ', Str3)
Does Python islower() ignore spaces?
The built-in string islower() function follows a specific rule: the incoming string (given one) must have at least one cased character, and every cased character must be in lowercase.
If you apply the islower function to an empty string or multiple empty characters, it returns False because there is no cased character.
# Performing on Empty Space
Str2 = ' ';
print('Second Output For Empty Space is = ', Str2.islower())
TIP: However, if you combine a string of words with empty spaces, the islower function returns True. Check the Str1 example.
Using islower on special characters
If you observe the code below, the given string has only special characters (@ and ! symbols) and no lowercase letters (at least one). So, it fails the islower function’s fundamental rule, and the result is False.
# Performing on Special Characters
Str5 = '!!!@@@'.islower()
print('Fifth Output = ', Str5)
Does Python islower ignore numbers and special characters?
On the other hand, the following examples combine numbers, special characters, and lowercase letters. Here, the islower() function ignores numbers (digits) and special characters and checks whether the letters are lowercase. If they are, the islower function returns True.
# Performing on both Digits and Alphabets
Str4 = '1239abcd'.islower()
print('Fourth Output = ', Str4)
# Performing on Both Alphabets & Special Characters
Str6 = 'abc!!!@@@'.islower()
print('Sixth Output = ', Str6)

TIP: I suggest you refer to the Python lower(), Python isupper(), and Python swapcase() functions articles.
islower() with Unicode characters
place = "café"
print(place.islower())
True