Python istitle () method
description
Python istitle () method to detect all words are spelled string is an uppercase first letter and other letters to lowercase.
grammar
istitle () method syntax:
str.istitle()
parameter
- no.
return value
If the string all the words are spelled the first letter is an uppercase, lowercase letters and other returns True, otherwise False.
Examples
The following example shows an example of istitle () method:
#!/usr/bin/python str = "This Is String Example...Wow!!!"; print str.istitle(); str = "This is string example....wow!!!"; print str.istitle();
Examples of the above output results are as follows:
True False