Python - String title() Method


Advertisements

The 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.

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())

Output

Learning Python Is Fun.

String Methods
Advertisements