Home  »  ArticlesGuidesHow ToProgrammingTechnologyTools   »   How to Convert a String to Uppercase in Python With Examples

How to Convert a String to Uppercase in Python With Examples

At this tip of the day, we will show you how to convert a string to uppercase in the Python programming language using a practical example.

The Python programming language provides a handy function upper() that you can use to convert a string value to uppercase. Here is how you can use this feature.

To use this feature you must have installed Python on your system. Windows users can follow these steps here.

Open a Python shell by running the following command in your terminal or cmd.

$ python

Now run the following code below:

>>> s = "Hello From Python"
>>> print(s.upper())
 
HELLO FROM PYTHON

There you have it.

Related:

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.