You are given a string and your task is to swap cases. In other words, convert all lowercase letters to uppercase letters and vice versa.
Www.HackerRank.com → wWW.hACKERrANK.COM Pythonist 2 → pYTHONIST 2
A single line containing a string S.
0<len(S)<=1000
Print the modified string S.
HackerRank.com presents "Pythonist 2".
hACKERrANK.COM PRESENTS "pYTHONIST 2".
In [ ]:
def swap_case(s):
if 0<len(s)<=1000:
return s.swapcase()
else:
exit()