Python String upper() Method

Python upper() method converts all the character to uppercase and returns a uppercase string.

Signature

Parameters

No parameters

Return

It returns a string.

Let's see some examples of upper() method to understand it's functionality.

Python String upper() Method Example 1

First see a simple example of upper() method. This method returns a uppercase string.

Output:

HELLO JAVATPOINT

Python String upper() Method Example 2

See, how can we use this method in programming. The below example converts all the elements of the list into uppercase. See the example.

Output:

 IRFAN
SOHAN
MOHAN

Python String upper() Method Example 3

An example that converts all the string into uppercase which starts with vowels. See the example below.

Output:

IRFAN
AMAN

Next TopicPython Strings




Latest Courses