Python String islower Method

The islower method in Python strings returns True when every character in the string is in lowercase. Conversely, it yields False if any character is not in lowercase.

Syntax of Python String islower Method

It has the following syntax:

Example

islower()

Parameters

No parameter is required.

Return

It returns either True or False.

Different Examples of Python String islower Method

Let us examine a few illustrations of the islower method to gain a better understanding of its capabilities.

Example 1

A straightforward illustration to grasp the application of this technique. It yields a true value, as demonstrated in the example provided below.

Example

# Python islower() method example

# Variable declaration

str = "logicpractice"

# Calling function

str2 = str.islower()

# Displaying result

print(str2)

Output:

Example 2

It yields False if any individual character is detected that is not in lowercase. Refer to the example provided below.

Example

# Python islower() method example

# Variable declaration

str = "Welcome To Example"

# Calling function

str2 = str.islower()

# Displaying result

print(str2)

Output:

Example 3

A string may contain numerical digits as well, and this function operates on the case of letters while disregarding any digits present. Consequently, it yields a True result, as demonstrated in the example provided below.

Example

# Python islower() method example

# Variable declaration

str = "hi, my contact is 9856******"

# Calling function

str2 = str.islower()

# Displaying result

print(str2)

Output:

Input Required

This code uses input(). Please provide values below: