str.lower() vs str.capitalize()
str.lower() and str.capitalize() are both Python String Methods APIs, and choosing between them is a common point of confusion. This page compares their syntax, parameters, return values, and typical use cases so you can pick the right one. str.lower(): Returns a copy of the string with all characters converted to lowercase. Its syntax is str.lower(), and it returns lowercase string str.capitalize(): Returns a copy with the first character capitalized and the rest lowercased. Its syntax is str.capitalize(), and it returns capitalized string Example of str.lower(): "HELLO".lower() # "hello". Example of str.capitalize(): "hello WORLD".capitalize() # "Hello world". Read the full references for str.lower() and str.capitalize() to see parameters, edge cases, and example code side by side. Other String Methods APIs worth comparing: str.upper(), str.title(), str.strip(), str.lstrip(), str.rstrip(), str.split(). Both belong to the String Methods category in the Python Reference documentation. Try both in the Python playground to see the behavioral difference live.