Table of Contents
The islower() method returns True if all alphabets in a string are lowercase alphabets. If the string contains at least one uppercase alphabet, it returns False.
The syntax of islower()
is:
string.islower()
1. islower() parameters
The islower()
method doesn’t take any parameters.
2. Return Value from islower()
The islower()
method returns:
- True if all alphabets that exist in the string are lowercase alphabets.
- False if the string contains at least one uppercase alphabet.
3. Example 1: Return Value from islower()
s = 'this is good' print(s.islower()) s = 'th!s is a1so g00d' print(s.islower()) s = 'this is Not good' print(s.islower())
Output
True True False
4. Example 2: How to use islower() in a program?
s = 'this is good' if s.islower() == True: print('Does not contain uppercase letter.') else: print('Contains uppercase letter.') s = 'this is Good' if s.islower() == True: print('Does not contain uppercase letter.') else: print('Contains uppercase letter.')
Output
Does not contain uppercase letter. Contains uppercase letter.
Related posts:
Python format()
Python Program to Differentiate Between type() and isinstance()
Python Program to Differentiate Between del, remove, and pop on a List
Deep Learning with Applications Using Python - Navin Kumar Manaswi
Python for Loop
Python map()
Python Program to Merge Mails
Python Program to Find Armstrong Number in an Interval
Python String partition()
Python Program to Get a Substring of a String
Python String rsplit()
Python Set difference()
Java Program to Permute All Letters of an Input String
Python Global Keyword
CharSequence vs. String in Java
Deep Learning with Python - A Hands-on Introduction - Nikhil Ketkar
Python Program to Get Line Count of a File
Python Operator Overloading
Python Program to Sort Words in Alphabetic Order
Convert String to Byte Array and Reverse in Java
Python Set symmetric_difference()
Python Program to Create a Long Multiline String
Python Program to Get the Last Element of the List
Python issubclass()
Python Program to Make a Simple Calculator
Python Program to Add Two Matrices
Python String center()
Python String replace()
Python any()
Natural Language Processing with Python - Steven Bird & Ewan Klein & Edward Loper
Python List reverse()
Python Program to Create a Countdown Timer