Python - String Method - istitle() Tutorial
The istitle() method returns True if the string is in the title case( i.e first letter of each word in a string starts with uppercase, and the rest of all letters should be lowercase), otherwise, it returns False.
Syntax-
String.istitle()
Example-
str1 = "Python is programming language"
print(str1.istitle())
str2 = "Python Is Programming Language"
print(str2.istitle())
str3 = "Python Is @1 Programming Language"
print(str3.istitle())
Output-
True
True
False