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 object()
Python List Comprehension
Python Program to Display the multiplication Table
Python Program to Create a Countdown Timer
Python Machine Learning - Sebastian Raschka
Python list()
Python Program to Differentiate Between del, remove, and pop on a List
Intelligent Projects Using Python - Santanu Pattanayak
Python any()
Python Program to Illustrate Different Set Operations
Python Program to Copy a File
Building Machine Learning Systems with Python - Willi Richert & Luis Pedro Coelho
Python Program Read a File Line by Line Into a List
Python Program to Transpose a Matrix
Python String rsplit()
Python max()
Python 3 for Absolute Beginners - Tim Hall & J.P Stacey
Python Dictionary copy()
Reading an HTTP Response Body as a String in Java
Python Program to Compute the Power of a Number
Python for Programmers with introductory AI case studies - Paul Deitel & Harvey Deitel
Most commonly used String methods in Java
Python iter()
Python Data Analytics with Pandas, NumPy and Matplotlib - Fabio Nelli
Python Exception Handling Using try, except and finally statement
Python String format()
Python Tuple index()
Introduction to Scientific Programming with Python - Joakim Sundnes
Python input()
Python Program to Calculate the Area of a Triangle
Python Set issuperset()
Convert Character Array to String in Java