Python - String format_map() Method


Advertisements

The istitle() method is used to check whether all characters of the string is in title format or not. It returns true when all characters of the string is in title format, else returns false. A title format means first character of each word in uppercase and rest of all characters in lower case.

Syntax


string.istitle()

Example:


MyString = "Hello World!"
print(MyString.istitle())
MyString = "HelloWorld"
print(MyString.istitle())

Output

True    #for "Hello World!"
False   #for "HelloWorld"

String Methods
Advertisements