ReferenceString methods
str.title()
Upper-cases the first letter of each word.
Signature
text.title()Returns
A new string.
Example
Python
print("ada lovelace".title())
print("it's fine".title())Output
Ada Lovelace It'S Fine
Basics
Strings
Collections
Functions
Classes and objects
Modules and the standard library
Files and errors
Beyond the basics
ReferenceString methods
Upper-cases the first letter of each word.
text.title()A new string.
print("ada lovelace".title())
print("it's fine".title())Output
Ada Lovelace It'S Fine