Facebook Page Twitter Page LinkedIn Page
× Python Tutorial Python Advanced Python Resources Python Libraries


The Python String title() method is used to convert all characters of the string in title format. A title format consists of first character of every word in uppercase and rest in lowercase. Any symbol, space, special character or number in the string is ignored while applying this method. Only Alphabets are converted.

Syntax

string.title()

Parameters

No parameter is required.

Return Value

Returns the string with all characters of the given string in the title format.

Example:

In the below example, title() method to used to convert all characters of the string in title format.

MyString = "learning python is fun."
print(MyString.title())

The output of the above code will be:

Learning Python Is Fun.

❮ Python String Methods