{"id":9468,"date":"2021-01-18T12:19:22","date_gmt":"2021-01-18T17:19:22","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=9468"},"modified":"2021-12-04T05:42:09","modified_gmt":"2021-12-04T05:42:09","slug":"convert-string-uppercase-python-examples","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/convert-string-uppercase-python-examples\/","title":{"rendered":"How to Convert a String to Uppercase in Python With Examples"},"content":{"rendered":"\n

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.<\/p>\n\n\n\n

The Python<\/a> programming language provides a handy function upper()<\/strong> that you can use to convert a string value to uppercase. Here is how you can use this feature.<\/p>\n\n\n\n

To use this feature you must have installed Python on your system<\/a>. Windows users can follow these steps here<\/a>.<\/p>\n\n\n\n

Open a Python shell by running the following command in your terminal or cmd.<\/p>\n\n\n\n

$ python<\/code><\/pre>\n\n\n\n

Now run the following code below:<\/p>\n\n\n\n

>>> s = "Hello From Python"\n>>> print(s.upper())\n \nHELLO FROM PYTHON<\/code><\/pre>\n\n\n\n

There you have it.<\/p>\n\n\n\n

Related:<\/strong><\/p>\n\n\n\n