Python String title() Method
Converts the first character of each word to uppercase and the rest of the characters in each word to lowercase, such that the resulting string conforms with the rules for a title.
Syntax
Python
Copy Code
string.title()
Example
Python
Copy Code
str = 'hello wORLD!' print(str.title())
Output
Hello World!