Latest web development tutorials

Python title () method

Python strings Python strings


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....wow!!!";
print str.title();

Examples of the above output results are as follows:

This Is String Example....Wow!!!

Python strings Python strings