Python3 istitle() Method
Description
The istitle() method checks whether the first letter of all words in the string is uppercase and the other letters are lowercase.
Syntax
Syntax of the istitle() method:
str.istitle()
Parameters
- None.
Return Value
Returns True if the first letter of all words in the string is uppercase and the other letters are lowercase; otherwise, it returns False.
Example
The following example demonstrates the istitle() method:
Example
#!/usr/bin/python3
str = "This Is String Example...Wow!!!"
print (str.istitle())
str = "This is string example....wow!!!"
print (str.istitle())
The output of the above example is as follows:
True False
Other Extensions
Python3 Strings