istitle() Function in Python – Check for proper case or title case

istitle() Function in python checks whether the string consists of title case or proper case only. lets see an example of python istitle() Function

 

Syntax for istitle() Function in Python:

str.istitle()

Returns true if only title case or proper case is found else returns false.

 

Example of istitle() Function in python:

str1 = " 2018 Is At Doorstep"; 
print str1.istitle()

str1="Beauty of DEMOCRACY"
print str1.istitle()

so the output will be

True

False

 

previous istitle() Function in python                                                                                                           next istitle() Function in python

Author

  • Sridhar Venkatachalam

    With close to 10 years on Experience in data science and machine learning Have extensively worked on programming languages like R, Python (Pandas), SAS, Pyspark.

    View all posts