s = \'the brown fox\'
...do something here...
s should be:
s
\'The Brown Fox\'
What\'s the easiest
Copy-paste-ready version of @jibberia anwser:
def capitalize(line): return ' '.join(s[:1].upper() + s[1:] for s in line.split(' '))