Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

python tolower

  •  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




This post first appeared on Java Tutorial - InstanceOfJava, please read the originial post: here

Share the post

python tolower

×

Subscribe to Java Tutorial - Instanceofjava

Get updates delivered right to your inbox!

Thank you for your subscription

×