Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (1.6k points)

I want

s = 'the brown fox'

as 

s should be :
'The Brown Fox'

What's the easiest way to do this?

1 Answer

0 votes
by (25.1k points)

You can use the title method on the string in python. Like this:

s = "the brown fox"

s =s.title()

print(s)

The output will be: "The Brown Fox"

Browse Categories

...