String Methods
str.istitle()
Recognize titlecase structure: at least one cased character, with each cased run beginning uppercase or titlecase and continuing lowercase. Uncased boundaries can include punctuation or digits. This is not a linguistic heading-style checker and can differ from a simple equality test against title() on uncased strings. Takes no arguments.
Formal Syntax & Structure
python syntaxpython
text.istitle()Return Value
bool
True when the stated classification holds; otherwise False.
Working Example
Example Snippetpython
for text in ("Data Tools", "DATA Tools", "Part2Name", "سلام", ""): print(repr(text), text.istitle())