title() method –
The title method capitalizes the first character of each word in a string.
In : s1 = "hi, how are you doing?" In : s1.title() Out: 'Hi, How Are You Doing?' In : s2 = "I am doing FINE" In : s2.title() Out: 'I Am Doing Fine'
The title method does not change the original string. It remains as it is.
In : s1 Out: 'hi, how are you doing?' In : s2 Out: 'I am doing FINE'