I have a string:
string = "Hello World"
That needs changing to:
"hello WORLD"
Using only split and join in Python.
Any help?
string = "Hello World"
split_str = string.split()
Can’t then work out how to get first word to lowercase second word to uppercase and join
>Solution :
string = "Hello World"
split_str = string.split()
print(' '.join([split_str[0].lower(),split_str[1].upper()]))