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 String ljust()
Python String isalpha()
Statistical Methods for Machine Learning - Disconver how to Transform data into Knowledge with Pytho...
Python Program to Check if a Number is Positive, Negative or 0
Python property()
Python iter()
Python repr()
Introduction to Machine Learning with Python - Andreas C.Muller & Sarah Guido
Java – Reader to String
Python Set symmetric_difference_update()
Python Namespace and Scope
Python Program to Access Index of a List Using for Loop
Java – String to Reader
Deep Learning with Python - Francois Cholletf
Python Program to Capitalize the First Character of a String
Python Tuple index()
Python Set union()
Python String encode()
Python Program to Check Whether a String is Palindrome or Not
Python Set add()
Python Object Oriented Programming
Python Package
Python String startswith()
Python Program to Iterate Over Dictionaries Using for Loop
Python int()
Encode a String to UTF-8 in Java
Python String isidentifier()
Deep Learning in Python - LazyProgrammer
Python Program to Extract Extension From the File Name
Python globals()
Python time Module
Machine Learning Applications Using Python - Cases studies form Healthcare, Retail, and Finance - Pu...