Python String islower Method - Python Tutorial | Logic Practice
Python Course / Data Types / Python String islower Method

Python String islower Method

BLUF: This lesson on Python String islower Method provides a comprehensive guide to understanding and implementing this concept in Python. Whether you're a beginner or looking to refresh your knowledge, you'll find clear explanations and interactive code examples here.
Key Concept: Python String islower Method

Mastering Python String islower Method is essential for building efficient Python applications. Focus on the syntax and the best practices highlighted in this tutorial.

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:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience