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 Custom Exceptions
Python float()
Python String isspace()
Python zip()
Converting a Stack Trace to a String in Java
Python Program to Make a Flattened List from Nested List
Python Program to Capitalize the First Character of a String
Applied Text Analysis with Python - Benjamin Benfort & Rebecca Bibro & Tony Ojeda
Python Program to Find Factorial of Number Using Recursion
Most commonly used String methods in Java
Python iter()
Building Chatbots with Python Using Natural Language Processing and Machine Learning - Sumit Raj
Natural Language Processing with Python - Steven Bird & Ewan Klein & Edward Loper
Python Program to Check Whether a String is Palindrome or Not
Python String partition()
Python Program to Count the Number of Each Vowel
Java InputStream to String
Python List sort()
Python Program to Concatenate Two Lists
Python input()
Python Program to Convert Celsius To Fahrenheit
Python Program to Find Sum of Natural Numbers Using Recursion
Python Machine Learning Eqution Reference - Sebastian Raschka
Python String join()
Python String upper()
Python String format()
Python List extend()
Python Program to Check Armstrong Number
Python range()
Python Program to Remove Duplicate Element From a List
Python reversed()
Python strptime()