title() function in python by R4R Team

- title() is a python in-build function which are used to titled the string or it can change the string into title format.

Example

string is "my title"
then it will become "My Title"


program-


s="this is a string 123"
print(s.title())
s="THIS IS A STRING"
print(s.title())
print("Enter string")
s=input()
print("String in title format",s.title())


output-


This Is A String 123
This Is A String
Enter string
program of title in python
String in title format Program Of Title In Python


-In this program, we change the string into the title format by s.title() as shown in above program.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!