s = \'the brown fox\'
...do something here...
s should be:
s
\'The Brown Fox\'
What\'s the easiest
An empty string will raise an error if you access [1:]. Therefore I would use:
def my_uppercase(title): if not title: return '' return title[0].upper() + title[1:]
to uppercase the first letter only.