str.islower()
str.islower() Returns:
bool · Added in v3.x · Updated March 13, 2026 · String Methods string validation case
The .islower() method checks whether all cased characters in a string are lowercase and the string contains at least one cased character. It returns a boolean value, making it useful for validating input case, checking string types, and processing text data.
This method is part of Python’s suite of string classification methods. Unlike .isupper() which checks for uppercase, .islower() focuses on lowercase validation. The key distinction is that it only considers cased characters—digits, spaces, and punctuation are ignored entirely.
Syntax
str.islower()
Parameters
This method takes no parameters.
Examples
Basic usage
text = "hello"
print(text.islower())
# True
upper = "HELLO"
print(upper.islower())
# False
mixed = "Hello"
print(mixed.islower())
# False (H is uppercase)
Cased characters explained
# Only letters are cased - digits and symbols don't count
alphanumeric = "hello123"
print(alphanumeric.islower())
# True (letters are lowercase, digits ignored)
with_space = "hello world"
print(with_space.islower())
# True (both words are lowercase)
# Strings with no cased characters return False
no_cased = "123hello"
print(no_cased.islower())
# False - no cased characters means False
Mixed character types
# Punctuation is ignored
punct = "hello!"
print(punct.islower())
# True
# Digits are ignored
with_digit = "hello42"
print(with_digit.islower())
# True
# Underscores are ignored
with_underscore = "hello_world"
print(with_underscore.islower())
# True
Common Patterns
Validating usernames
def is_valid_username(username):
"""Username must be all lowercase."""
if not username:
return False
return username.islower()
print(is_valid_username("john_doe"))
# True
print(is_valid_username("John_Doe"))
# False
print(is_valid_username("JOHN_DOE"))
# False
Processing input lists
words = ["hello", "WORLD", "Python", "test", "CODE"]
# Filter to only lowercase words
lowercase_only = [w for w in words if w.islower()]
print(lowercase_only)
# ['hello', 'test']
Combining with other checks
def is_proper_snake_case(name):
"""Check if name follows snake_case convention."""
if not name:
return False
# Must be lowercase and can only contain underscores
return name.islower() and name.replace('_', '').isalnum()
print(is_proper_snake_case("my_variable"))
# True
print(is_proper_snake_case("My_Variable"))
# False
print(is_proper_snake_case("my-variable"))
# False
Unicode Support
Python 3 treats Unicode letters according to their case:
# Latin letters work as expected
print("hello".islower())
# True
# Greek lowercase letters
greek_lower = "πύθων"
print(greek_lower.islower())
# True
greek_upper = "ΠΎΘΩΝ"
print(greek_upper.islower())
# False
# Cyrillic
cyrillic_lower = "питон"
print(cyrillic_lower.islower())
# True
cyrillic_upper = "ПИТОН"
print(cyrillic_upper.islower())
# False
Behavior Notes
- Returns
Falsefor empty strings - Returns
Falsefor strings with no cased characters (e.g., “123”, ”!!!”) - Only letters are cased—digits, punctuation, and spaces are ignored
- Unicode lowercase letters (category Ll) return True