1

I have a string

string = 'One Hundred Two Thousand Nine'

how can i make all words be lower cases except first word.

So output should be like

string = 'One hundred two thousand nine'
Chaban33
  • 1,362
  • 11
  • 38
  • You mean all words or all characters? Because the answer provided by Kostas is for all characters except first one. – mbh86 Oct 08 '19 at 10:33

1 Answers1

3

There is a built-in function to do this:

string = 'One Hundred Two Thousand Nine'
print(string.capitalize())
Kostas Charitidis
  • 2,991
  • 1
  • 12
  • 23