codescracker


python

Python Program to Convert Uppercase to Lowercase



« Previous Program Next Program »


Convert Uppercase to Lowercase in Python

To convert uppercase character or string to lowercase character or string in python, you have to ask from user to enter a string or character to convert the given string or character into lowercase string or character using the function lower() as shown here in the program given below. You can also convert uppercase character to lowercase character with your own.

Python Programming Code to Convert Uppercase to Lowercase

Following python program ask from user to enter string and convert it into lowercase string:

# Python Program - Convert Uppercase to Lowercase
		
while True:
	print("Enter 'x' for exit.")
	string = input("Enter any string: ")
	if string == 'x':
		break
	else:
		string_in_lowercase = string.lower()
		print("String in Lowercase =",string_in_lowercase,"\n")

Here is the sample run of the above Python program illustrating how to convert uppercase to lowercase string:

python convert uppercase to lowercase

Same Program in Other Languages

You may also like to learn or practice the same program in other popular programming languages:


« Previous Program Next Program »




Tools
Calculator

Quick Links
Signup - Login - Give Online Test