str.lower()

str.lower()
Returns: str · Added in v3.x · Updated March 13, 2026 · String Methods
strings case conversion

The lower() method returns a copy of the string with all characters converted to lowercase. This is one of the most commonly used string methods in Python—useful for normalizing text, case-insensitive comparisons, and processing user input.

Unlike casefold(), lower() only handles basic ASCII case conversion for ASCII letters. For Unicode-aware case conversion (especially useful for international text), use casefold() instead.

Syntax

str.lower()

Parameters

This method takes no parameters.

Examples

Basic usage

text = "Hello World"
lowered = text.lower()
print(lowered)
# hello world

Processing user input

# Normalize user input for comparison
response = "YES"
if response.lower() == "yes":
    print("User confirmed")
# User confirmed

Converting multiple strings

words = ["Apple", "BANANA", "Cherry"]
lowered = [w.lower() for w in words]
print(lowered)
# ['apple', 'banana', 'cherry']

Common Patterns

text = "Python is a powerful programming language"

# Check if substring exists, ignoring case
search_term = "PYTHON"
if search_term.lower() in text.lower():
    print("Found it!")
# Found it!

Normalizing data for comparison

# Compare strings regardless of case
password = "MySecurePass123"
entered = "mysecurepass123"

if password.lower() == entered.lower():
    print("Login successful")
else:
    print("Invalid password")
# Login successful

Grouping case-insensitive keys

# Create case-insensitive dictionary
data = {}

def add_case_insensitive(key, value):
    lower_key = key.lower()
    data[lower_key] = value

add_case_insensitive("User", 1)
add_case_insensitive("USER", 2)
add_case_insensitive("user", 3)

print(data)
# {'user': 3}

Processing file paths

# Normalize file extensions
filename = "IMAGE.PNG"
ext = filename.split(".")[-1].lower()
print(ext)
# png

Behavior Notes

  • Only letters A-Z are affected. Numbers, symbols, and whitespace remain unchanged.
  • For Unicode characters outside ASCII, lower() uses Unicode lowercase rules but is less aggressive than casefold().
  • Returns a new string—the original is unchanged.

Unicode Considerations

The lower() method handles Unicode characters properly, though it differs from casefold() in how it treats certain special characters:

# German letter stays as-is with lower()
german = "ß"
print(german.lower())
# ß (unchanged, unlike casefold which converts to 'ss')

# Greek letters work correctly
greek = "ΣΩ"
print(greek.lower())
# σω

When building applications that must handle international text robustly, consider whether your use case needs casefold() for case-insensitive matching or if lower() suffices for simple display normalization.

See Also