- In python, to lower is used to convert the uppercase letters to lower case.
- It uses the function called lower().
- It doesn't have any parameters.
- The string must be enclosed with single or double-quotes.
- If the string does not contain any upper case letters then it returns the same string.
Example: s="HELLO"
str.lower(s)=hello
#write a python code to demonstrate the lower() function.
- s="APPLE IS A FRUIT"
- print(str.lower(s))
- x="My NAme IS aBCba"
- print(str.lower(x))
output: apple is a fruit
my name is abcba
No comments