In this section, we will learn what String lower() method is and how to use it in Python.
What is String lower() Method in Python?
The Python string lower() method is used to turn the characters of a string value into lowercase.
Python String lower() Method Syntax:
string.lower()
String lower() Method Parameter
The method does not take an argument.
String lower() Method Return Value
The return value of this method is a copy of the target string value with all characters set to lowercase.
Example: converting string to lowercase python
s1 = "think BIG" result = s1.lower() print(result)
Output:
think big
Example: lowercase in python
s1 = "ThiS iS A STRing ValUE" result = s1.lower() print(result)
Output:
this is a string value
Example: convert uppercase to lowercase
s1 = "THIS IS A STRING VALUE" result = s1.lower() print(result)
Output:
this is a string value