String lower() Method in Python
Last Updated :
19 Nov, 2025
The lower() method converts all uppercase alphabetic characters in a string to lowercase. It returns a new string every time because strings in Python are immutable. Only letters are affected; digits, symbols and spaces remain unchanged.
Example 1: This example converts a regular sentence into lowercase to show how alphabetic characters are transformed.
Python
text = "HELLO World!"
print(text.lower())
Explanation: Only letters are converted to lowercase; digits and punctuation remain unchanged.
Example:
Input: "HELLO World 123!"
Output: "hello world 123!
Explanation: The method converts only uppercase letters (H, E, L, L, O, W) to lowercase. Numbers and punctuation stay the same.
Syntax
string.lower()
- Parameters: This method does not take any parameters.
- Return Type : returns a new string with all uppercase characters converted to lowercase. The original string remains unchanged since strings in Python are immutable.
Example 2: This example demonstrates how lower() handles strings that mix letters, numbers and symbols.
Python
s = "GFG123@PYTHON"
print(s.lower())
Example 3: This example shows how lower() normalizes inconsistent capitalization in a name.
Python
name = "jeFFreYy"
print(name.lower())
Case-Insensitive Comparison Using lower()
When comparing two strings, differences in uppercase or lowercase can lead to incorrect results. Using lower() ensures both values are converted to the same case, allowing accurate and reliable comparisons.
Example 1: This example compares two product codes by converting both to lowercase to avoid mismatches due to case differences.
Python
p1 = "AbC123"
p2 = "abc123"
print(p1.lower() == p2.lower())
Explanation: Both strings become "abc123", so the comparison evaluates to True.
Example 2: This example checks whether a keyword exists in a sentence by converting both to lowercase for case-insensitive searching.
Python
txt = "Machine Learning With PYTHON"
a = "python"
print(a.lower() in txt.lower())
Explanation: Both are converted to lowercase, enabling the search to correctly match "python" with "PYTHON".
Explore
Python Fundamentals
Python Data Structures
Advanced Python
Data Science with Python
Web Development with Python
Python Practice