+ 2
A string value containing more than 1 word is passed as the input(runtime) to the program(hint-use swapcase by splitting-string)
input: tHiS is my book required output: ThIs is my book
2 odpowiedzi
+ 7
also:
s = input().split()
print(*(w.swapcase() if w == s[0] else w for w in s))
+ 16
def solve(s):
s = s.split(' ', 1)
return s[0].swapcase() + ' ' + s[1]