•  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.
Syntax: str.lower()

Example: s="HELLO"

             str.lower(s)=hello

#write a python code to demonstrate the lower() function.

  1. s="APPLE IS A FRUIT"
  2. print(str.lower(s))
  3. x="My NAme IS  aBCba"
  4. print(str.lower(x))
output: apple is a fruit
              my name is abcba


Instance Of Java

We are here to help you learn! Feel free to leave your comments and suggestions in the comment section. If you have any doubts, use the search box on the right to find answers. Thank you! 😊
«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply

Select Menu