Given a String, the task is to write a Python program to check if the string has lowercase letters or not.
Input: "Live life to the fullest" Output: false Input: "LIVE LIFE TO THe FULLEST" Output: false Input: "LIVE LIFE TO THE FULLEST" Output: true
Methods 1#: Using islower()
It Returns true if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.
Methods 2#: Using isupper()
It Returns true if all cased characters in the string are uppercase and there is at least one cased character, false otherwise.
Methods 3#: Using ASCII Value to check whether a given character is in uppercase or lowercase.
The ord() function returns an integer representing the Unicode character.
print(ord('A')) # 65 print(ord('a')) # 97
Lower Character found
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course