Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
About Lesson

istitle():-

        The istitle() method returns True if all words in a text start with a upper case letter, AND the rest of the word are lower case letters, otherwise False. Symbols and numbers are ignored.

Syntax:-       string.istitle()

txt = “Hello, And Welcome To My World!”

x = txt.istitle()

print(x)

Output

True

 

a = “HELLO, AND WELCOME TO MY WORLD”

b = “Hello”

c = “22 Names”

d = “This Is %’!?”

print(a.istitle())

print(b.istitle())

print(c.istitle())

print(d.istitle())

Output

False

True

True

True

error: Content is protected !!