What is the Python String lower() Method?
The `lower()` method is a string method in Python. When applied to a string, it converts all the characters in the string to lowercase.
This is useful for standardizing and comparing strings without considering case differences. For example, if the original string is “Hello World,” applying `lower()` would result in “hello world.” It is a commonly used method for case-insensitive string operations.
Python String lower() Method
Python string lower() method converts all letters of a string to lowercase. If no uppercase characters exist, it returns the original string.
Example:
Python3
string = "ConvErT ALL tO LoWErCASe" print (string.lower()) |
Output
convert all to lowercase