ReferenceString methods
str.upper()
A copy with every character in upper case.
Signature
text.upper()Returns
A new string. The original is unchanged.
Example
Python
word = "python"
print(word.upper())
print(word)Output
PYTHON python
Basics
Strings
Collections
Functions
Classes and objects
Modules and the standard library
Files and errors
Beyond the basics
ReferenceString methods
A copy with every character in upper case.
text.upper()A new string. The original is unchanged.
word = "python"
print(word.upper())
print(word)Output
PYTHON python