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

title():-

        The title() method returns a string where the first character in every word is upper case. If the word contains a number or a symbol, the first letter after that will be converted to upper case.

Syntax:-                       string.title()

Note: first letter after a non-alphabet letter is converted into a upper case letter:

txt = “Welcome to my 2nd lecture”

x = txt.title()

print(x)

Output

Welcome To My 2Nd Lecture

txt = “hello b2b2b2 and 3g3g3g”

x = txt.title()

print(x)

Output

Hello B2B2B2 And 3G3G3G

error: Content is protected !!