Latest web development tutorials

Python3 title () method

Python3 string Python3 string


description

Python title () method returns the "title" of the strings, that are all words beginning with a capital, and the remaining letters are lowercase (see istitle ()).

grammar

title () method syntax:

str.title();

parameter

  • NA.

return value

Back "title" of the string, that are all words beginning with a capital.

Examples

The following example shows the title () function to use:

#!/usr/bin/python

str = "this is string example from w3big....wow!!!"
print (str.title())

Examples of the above output results are as follows:

This Is String Example From w3big....Wow!!!

Python3 string Python3 string