upper() string method in Python
The upper is a built-in string method converts all characters in the string to uppercase.
Syntax string.upper()
Example:
Python
text = "hello world" # Convert to uppercase print(text.upper()) # Output: HELLO WORLD
Special Note: • Does not modify the original string (strings are immutable in Python).
• Returns a new string.