What is the String upper() Method?

String upper() is an in-built function in Python, that converts all the letters in a string to uppercase(capital) and then returns it.

It is very useful for standardizing string cases, like when comparing case-insensitive strings.

Python String upper() Function

Python String upper() method converts all lowercase characters in a string into uppercase characters and returns it.

Example:

Python3




original_text = "lisT Upper"
upper_text = original_text.upper()
print(upper_text)


Output

LIST UPPER

Similar Reads

What is the String upper() Method?

...

Python String upper() Syntax

String upper() is an in-built function in Python, that converts all the letters in a string to uppercase(capital) and then returns it....

How to Use String upper() Function?

string.upper()...

Methods to Convert String to Uppercase

The string upper() function is a simple and easy-to-use function. You just need to call the upper() function with the string object. Let’s understand how to convert string to uppercase(capital) with an example:...