You are viewing a single comment's thread. Return to all comments →
def swap_case(s): return_str = '' for char in s: if char.isupper(): return_str += char.lower()
elif char.islower(): return_str += char.upper() else: return_str += char return return_str
if name == 'main': s = input() result = swap_case(s) print(result)
Seems like cookies are disabled on this browser, please enable them to open this website
sWAP cASE
You are viewing a single comment's thread. Return to all comments →
def swap_case(s): return_str = '' for char in s: if char.isupper(): return_str += char.lower()
if name == 'main': s = input() result = swap_case(s) print(result)