Menu Close

Python String islower() Method

python string islower

Here we are going to learn all about the Python string islower() method along with examples to check a string all the characters in the string are lower or not.

In previous tutorial, we have seen string isidentifier() method to check identifier.

Python String islower() method:

The Python string islower() method is used to check whether a string all lowercase characters or not.
If the string contains all lowercase characters, It returns True otherwise it returns False.

Syntax:

The syntax of the python string islower() method is:-

string.islower()

Parameter:

The Python string islower() method does not support any parameter.

Return Type:

islower function in python return Boolean value: True or False.

Let’s see an example for using python islower() string method.

Python string islower Examples:

Here we will take some examples to understand islower function in python.

Example 1:

str = "python"
str2 = str.islower()
print(str2)

Output will be True.

Example 2:

str = "python 1213"
str2 = str.islower()
print(str2)

Output will be True because it check only characters.

Example 3:

str = "PROGRAMMING"
str2 = str.islower()
print(str2)

Output will be False.

Example 4:

str = "Programming"
str2 = str.islower()
print(str2)

Output will be False.

Note:- Python string islower function check only characters not numbers, symbols, and spaces.

Conclusion

In this tutorial, you have learned pythons string islower() method to check all the characters in the string are lower case or not.

If all the characters are lowercase, then it returns True otherwise it returns False.
I hope this tutorial will help you. if you like this article, please share it with your friends who want to learn Python programming from scratch to advanced.

For More Information:- Click Here

Previous Article
Next Article

Was this post helpful?

Related Posts

Leave a Reply