THE WORLD'S LARGEST WEB DEVELOPER SITE

Python String upper() Method

❮ String Methods


Example

Upper case the string:

txt = "Hello my friends"

x = txt.upper()

print(x)
Run example »

Definition and Usage

The upper() method returns a string where all characters are in upper case.

 Symbols and Numbers are ignored.


Syntax

string.upper()

Parameter Values

No parameters


❮ String Methods