Python String Method – istitle()

Spread the love

istitle() method –

istitle() method return True if a string is titlecased otherwise it returns False. A string is titlecased if the first character of each words is uppercase letter.

syntax –

string.istitle()

Example –

In [1]: string1 = 'I Love Python'

In [2]: string1.istitle()
Out[2]: True

In [3]: string2 = 'i love Python'

In [4]: string2.istitle()
Out[4]: False

In [5]: string3 = 'PYTHON'

In [6]: string3.istitle()
Out[6]: False

Related Posts –

  1. Python String Method – Capitalize()
  2. Python String Method – title()
  3. Python String Method – center()
  4. Python String Method – count()
  5. Python String Method – startswith()
  6. Python String Method – endswith()
  7. Python String Method – find()
  8. Python String Method – index()
  9. Python String Method – isalnum()
  10. Python String Method – isalpha()
  11. Python String Method – isdecimal()
  12. Python String Method – isdigit()
  13. Python String Method – islower()

Rating: 1 out of 5.

Leave a Reply