Python string.title Function

Jesse Hager wrffruntre at tznvy.pbz.ROT13
Tue Apr 11 15:24:43 EDT 2006


Try something like:

def capwords(words):
     return ' '.join([x.capitalize() for x in words.split()])

capwords("here's my title!")
"Here's My Title!"

--
Jesse Hager
email = "wrffruntre at tznvy.pbz".decode("rot13")



More information about the Python-list mailing list