Python3 istitle() Method
Description
The istitle() method checks whether all words in a string begin with an uppercase letter and all other letters are lowercase.
Syntax
Syntax of the istitle() method:
str.istitle()
Parameters
- none.
Return Value
Returns True if all words in the string begin with an uppercase letter and all other letters are lowercase, otherwise False.
Example
The following example demonstrates the istitle() method:
Example
#!/usr/bin/python3
str
=
"
This Is String Example...Wow!!!
"
(
str
.
istitle
(
)
)
str
=
"
This is string example....wow!!!
"
(
str
.
istitle
(
)
)
The output of the above example is:
True
False
Python3 Strings