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