upper() / lower()
Converts text to upper / lowercase.
Syntax
text.upper() · text.lower()
Description
upper() makes all letters UPPERCASE, lower() makes all lowercase. It doesn't change the original, it returns new text.
Returns
Converted new text (str).
Example
Loading editor…
Expected output
HEXLIBRARY hexlibrary
When to use?
Ignoring case differences when comparing user input (email, search).
Common mistakes
- ⚠️ Unexpected results may occur with the Turkish 'i' character (I/İ conversion).