Tutorial Study Image

Python lower()

The lower() function in python helps to return a copy of the original string in which all the uppercase characters of the string are converted into lowercase. If no uppercase letters, it will return the original string.


lower() Parameters:

The lower() method doesn't take any parameters. At the time of conversion, all symbols and letters are ignored.

lower() Return Value

The return value is always a string. All the Unicode chars are not converted using the lower() method. Consider the German lowercase letter 'ß' which is equivalent to 'ss' it is already in lowercase, so this method would not convert it.

Input Return Value
string lowercased string

Examples of lower() method in Python

Example 1: How to convert a string to lowercase

# example string
string = "HOW ARE YOU?"

# string with numbers

string = "Hii! How Are You123?"


how are you?
hii! how are you123?

Example 2: How lower() is used with condition check in a program?

# first string
String1 = "ProgRammIng LanGuaGe!"

# second string

if(String1.lower() == String2.lower()):
    print("The two strings are same.")
    print("The two strings are not same.")


The two strings are same.