Title function in python is the Python String Method which is used to convert the first character in each word to Uppercase and remaining characters to Lowercase in string and returns new string.
Syntax:
str.Title() parameters:str is a valid string which we need to convert. return: This function returns a string which has first letter in each word is uppercase and all remaining letters are lowercase.
# Python Title() Method Example str1 = 'geeKs foR geEks'str2 = str1.title() print 'First Output after Title() method is = ', str2 # observe the original string print 'Converted String is = ', str1.title() print 'Original String is = ', str1 # Performing title() function directly str3 = 'ASIPU pawan kuMAr'.title() print 'Second Output after Title() method is = ', str3 str4 = 'stutya kUMari sHAW'.title() print 'Third Output after Title() method is = ', str4 str5 = '6041'.title() print 'Fourth Output after Title() method is = ', str5 |
chevron_right
filter_none
Output:
First Output after Title() method is = Geeks For Geeks Converted String is = Geeks For Geeks Original String is = geeKs foR geEks Second Output after Title() method is = Asipu Pawan Kumar Third Output after Title() method is = Stutya Kumari Shaw Fourth Output after Title() method is = 6041
Recommended Posts:
- Convert string to title case in Python
- title driver method - Selenium Python
- Python String Methods | Set 1 (find, rfind, startwith, endwith, islower, isupper, lower, upper, swapcase & title)
- numpy string operations | title() function
- Matplotlib.pyplot.title() in Python
- How to get title of a webpage using Selenium in Python?
- turtle.title() function in Python
- Python IMDbPY – Getting title from searched movie
- Python | Pandas Series.str.lower(), upper() and title()
- Python - Obtain title, views and likes of YouTube video using BeautifulSoup
- Python String | isupper() method
- Python string | capwords() method
- Python String | islower() method
- Python String | lstrip() method
- PyQt5 QCalendarWidget - Getting Title
- Pafy - Getting Title of Stream
- Pafy - Getting Title of the Video
- Pafy - Getting Playlist Title
- PyQt5 QDockWidget – Getting Window Title
- PyQt5 QDockWidget – Getting Title Bar widget
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

