Articles

Program to transform a string from uppercase to lowercase in Python

Program to transform a string from uppercase to lowercase in Python


In the python programing article, we are going to learn

  • program to transform a string from uppercase to lowercase in python

Program to transform a string from uppercase to lowercase in Python

The program is as follows:

 

# Owner : TutorialsInhand Author : Devjeet Roy

string = input("Enter a sentence in uppercase: ").strip()

lowercase_string = string.lower()

print("The string in lowercase is:",lowercase_string)

The output of the program is as follows:

 

PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter a sentence in uppercase: I AM A BOY
The string in lowercase is: i am a boy

Few important tips about the program

1. We use the .lower() method in python to covert a string to lowercase string.

 

program-to-convert-string-to-lowercase-in-python

 


Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Devjeet Roy
Full Stack Web Developer & Data Science Enthusiast
Page Views :    Published Date : Oct 13,2022  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!