Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python3 istitle() Method

Python3 istitle() Method

Python3 Strings Python3 Strings


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

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!!!

"

print

(

str

.

istitle

(

)

)

str

=

"

This is string example....wow!!!

"

print

(

str

.

istitle

(

)

)

The output of the above example is:


True
False

Python3 Strings Python3 Strings