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
print("Hello World".istitle(), "Hello world".istitle(), "HELLO".istitle())
Output
True False False
print("They're Here".istitle()) # apostrophes start a new "word"
Output
False
Version history
| Version | Change |
|---|---|
| Python 3.0 | Added |
Related
str.title()· Return a title-cased copy: the first letter of each word upper case and the rest lower case.str.isupper()· Return True if all cased characters are upper case and there is at least one cased character.str.islower()· Return True if all cased characters are lower case and there is at least one cased character.- Python Strings · tutorial