islower()

my_str.islower()
Returns True if all chars in a string are in lower case, otherwise returns False
my_str='_abc45'
print(my_str.islower())     # Output is True

my_str='ab#cd'
print(my_str.islower())     # Output is True

my_str='A_abc1234'
print(my_str.islower())     # Output is False

my_str='pq?rs'              
print(my_str.islower())     # Output is True

my_str='pq rs'              
print(my_str.islower())     # Output is True

my_str='12ab'              
print(my_str.islower())     # Output is True

Handling Special Characters and Numbers

islower() ignores numbers and special characters, focusing only on alphabetic characters:

my_str = 'hello_123!'
print(my_str.islower())
True

Use Case: Validating User Input

We can use islower() to validate user input that must be in lowercase:

user_input = 'securepassword'
if user_input.islower():
    print("Valid input.")
Valid input.

Checking Mixed Case Strings

islower() returns False if the string contains uppercase letters:

text = 'Hello world'
print(text.islower())
False

Checking Empty Strings

For an empty string, islower() returns False because there are no lowercase characters to check:

empty_str = ''
print(empty_str.islower())
False

Handling Multilingual Text

islower() works with non-ASCII characters:

text = 'mañana'
print(text.islower())
True


All String methods isupper()


Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com







Python Video Tutorials
Python SQLite Video Tutorials
Python MySQL Video Tutorials
Python Tkinter Video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer