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"

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...