Python String – islower() method

It is a method in python that checks if the given string has all the characters in lower case. It returns True if the condition satisfies else returns False. It checks for the alphabets and all the other characters are overlooked.

Syntax:

string.islower()

Example 1:

s = “codewindow123
x = s.islower()
print(x)

Output:

True

Explanation:

Here the string contains the alphabets ”codewindow” which is in lower case. The digit is overlooked. Hence it returned True.

Example 2:

s = “codeWindow123
x = s.islower()
print(x)

Output:

False

Explanation:

Here the string has an upper case character i.e. “W” in the middle. Hence it returned False.

 

You Missed
Also Checkout