Skip to content

Capitalize the first letter of every word in the string using Python

In Python, title() function in String method returns a new string whose first letters are capitalized. In short, title() method returns a new title cased string from a string.

str = 'haha this doesnt seem to be working'
print str.title()

//Haha This Doesnt Seem To Be Working
See also  How to start ftpd server with Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.