str.title() Title case
Last updated: 2026-09-22
str.title() Title case
str.title() returns a titlecased version: first letter of each word uppercased, rest lowercased.
| Category | String Methods |
|---|---|
| Kind | Built-in Type Method |
| Python Version | all |
📝 Syntax
str.title()
Returns:str. A titlecased copy of the string.
Mutates the original:No (returns a new object)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
Hello World
They'Re Here
💡 Related Cases
More case studies coming soon — check back later.
❓ FAQ
QHow does title() behave with words containing apostrophes?
AIt is not smart enough. "they're".title() gives "They'Re", where the 're after the apostrophe is treated as a new word and capitalized. Be careful when processing English text.
QWhat is the difference from capitalize()?
Atitle() capitalizes the first letter of every word and lowercases the rest; capitalize() only capitalizes the very first character of the whole string and lowercases everything else.
QHow do I check whether a string is already in title format?
AUse istitle(). Note that a result produced by title() is not necessarily True for istitle(), for example "They'Re".