In this article, you will learn about the Python string lower() method. Python string lower() method is used to convert uppercase characters to lowercase characters.
In the previous tutorial, we have seen the Python string ljust() method to left-align the string along with some examples.
Headings of Contents
Python String lower() Method
Python lower() string method returns the copy of the string after converting all the characters in lowercase.
lower function in Python is the most useful function to convert uppercase character to lowercase characters.
Syntax
The syntax of Python string lower method is:-
string.lower()
Parameter
lower function in python does not support any parameter.
Return Type
lower function in python returns new string.
Python string lower example
Here we will take some examples to understand lower function in python.
Example 1
a = 'PROGRAMMING'
result = a.lower()
print(result)
Output will be:- programming
Example 2
a = 'Programming Funda'
result = a.lower()
print(result)
Output will be:- programming funda
Example 3
a = 'PYTHON'
if a.lower() == 'python':
print("lower case")
else:
print("not lower case")
Output will be:- lower case
Conclusion
In this tutorial, you have learned the Python string lower() method to convert lowercase characters to uppercase characters.
This string method mostly used by Python programmers because using this method you can convert large amounts of uppercase characters into lowercase characters.
I hope this tutorial will have helped you. If you like this article, please share it with your friends who want to learn Python programming from scratch to advanced.
- String endswith() method
- String casefold() method
- String center() method
- String capitalize() method
- String count() method
- String index() method
- String format() method
- String isalpha() method
- String isidentifier() method
- String islower() method
- String isupper() method
For More Information:- Click Here