codescracker


python

Python Program to Convert Lowercase to Uppercase



« Previous Program Next Program »


Convert Lowercase to Uppercase in Python

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

Python Programming Code to Convert Lowercase to Uppercase

Following python program ask from user to enter any string to convert that string from lowercase to uppercase:

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

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

python convert lowercase to uppercase

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