str.upper()
str.upper() is a Python method in the String Methods category. Returns a copy of the string with all characters converted to uppercase. The syntax is str.upper(). Returns: Uppercase string. A typical example: "hello".upper() # "HELLO". A close sibling is str.lower(), which returns a copy of the string with all characters converted to lowercase. A close sibling is str.capitalize(), which returns a copy with the first character capitalized and the rest lowercased. A close sibling is str.title(), which returns a titlecased version where each word starts with uppercase. A close sibling is str.strip(), which removes leading and trailing whitespace (or specified characters). More about this category: String methods for text manipulation — split, join, replace, format, and more. For a broader walkthrough, read the String Methods guide. Related String Methods entries: str.lower(), str.capitalize(), str.title(), str.strip(), str.lstrip(), str.rstrip(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.