title() string method in Python

The title is a built-in string method converts the first character of each word to uppercase and the rest to lowercase.

Syntax string.title()

Example:

Python

text = "welcome to python programming"
print(text.title())
# Output: Welcome To Python Programming