Easy Tutorial
❮ Python File Read Ref Math Atan ❯

Python3 istitle() Method

Python3 String


Description

The istitle() method checks if all the words in the string are capitalized, with the first letter in uppercase and the following letters in lowercase.

Syntax

The syntax for the istitle() method is:

str.istitle()

Parameters

Return Value

Returns True if all the words in the string are capitalized with the first letter in uppercase and the following letters in lowercase; otherwise, returns False.

Example

The following example demonstrates the istitle() method:

#!/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 examples is:

True
False

Python3 String

❮ Python File Read Ref Math Atan ❯