Python 3 reference · String Methods

Python String istitle() Method

Return True if the string is title-cased: each word starts with an upper-case letter followed by lower-case letters.

Python 3 Since 3.0

Syntax

str.istitle()

Return value

True or False.

Examples

Basic useTry it yourself
print("Hello World".istitle(), "Hello world".istitle(), "HELLO".istitle())

Output

True False False
A surprise with apostrophesTry it yourself
print("They're Here".istitle())  # apostrophes start a new "word"

Output

False

Version history

VersionChange
Python 3.0Added