String Methods
str.title()
Apply default Unicode titlecasing to the start of each run of cased characters and lowercase following cased characters. Uncased characters such as apostrophes, digits and combining marks can start a new run. This is a simple algorithm, not a linguistic title style, and acronyms may lose their uppercase spelling. The receiver is immutable; the operation returns a string without modifying it. Do not rely on a new object identity.
Formal Syntax & Structure
python syntaxpython
text.title()Return Value
str
String containing the transformed text.
Working Example
Example Snippetpython
label = "API and data"print(label.title())print("o'neil".title())print("part2name".title())