How to Convert String Uppercase in Python?

Published On: 12/12/2022 | Category: Python


Hi Guys,

Today, python program to convert string to uppercase is our main topic. This tutorial will give you simple example of python function to convert string to uppercase. let’s discuss about how to convert string into uppercase in python. you'll learn python string convert to uppercase. Let's see bellow example how to turn a string into uppercase python.

In Python, it is possible to change a string's case to uppercase. I'll give you an example of how to transform a string into uppercase using the upper() technique. So let's look at the samples below.

So let's see bellow example:

Example 1:

main.py
myString = "Tuts-Station.com is a great site!"
  
# String Convert to UpperCase
upperString = myString.upper()
  
print(upperString);
Output
TUTS-STATION.COM IS A GREAT SITE!

It will help you....

Happy Pythonic Coding!