/  Istitle() method in Python String Module

Istitle() method in Python String Module


Istitle methodin string module returns the output as TRUE if the string follows all the title case rules or else it return the output as FALSE.


What do you mean by title case rules?

These are common conventional rules of capitalizing the first and last words and also all major words in between.

Capitalizing the words in a given headings, titles which contains below:

  1. Nouns
  2. Pronouns
  3. Adjectives
  4. Verbs
  5. Adverbs
  6. Subordinate conjunctions


Syntax:

str.istitle()


Example-1:

text = "The Indian Girl"
x = text.istitle()
print(x)


Output:


Example-2:

text = "The dark side of the life"
x = text.istitle()
print(x)


Output: