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.
Following python program ask from user to enter any string to convert that string from lowercase to uppercase:
# Python Program - Convert Lowercase to Uppercase print("Enter 'x' for exit."); string = input("Enter any string to convert in uppercase: "); if string == 'x': exit(); else: string_in_uppercase = string.upper(); print("\nString in Uppercase =",string_in_uppercase);
Here is the sample run of the above Python program demonstrating how to convert lowercase string to uppercase string:
Now enter any string say in lowercase say this IS codescracker. Here as you can see the word IS is in uppercase, but you don't have to worry about it, the above program will convert all the string's character into uppercase, either it is in lowercase or in uppercase.
After supplying the string, press enter to convert the same string in uppercase:
Same program on python shell:
Program Video with Compile and Run
You may also like to learn or practice the same program in other popular programming languages: