Python String istitle() Method
Example
Check if each word starts with an uppercase letter:
txt = "Hello, And Welcome To My World!" x = txt.istitle() print(x)
Definition and Usage
If all words in the text start with an uppercase letter and the rest of the word is lowercase, the istitle() method returns True. Otherwise, it returns False.
Symbols and numbers will be ignored.
Syntax
string.istitle()
Parameter Value
No parameters.
More Examples
Example
Check if each word starts with an uppercase letter:
a = "HELLO, AND WELCOME TO MY WORLD" b = "Hello" c = "22 Names" d = "This Is %'!?" print(a.istitle()) print(b.istitle()) print(c.istitle()) print(d.istitle())