You are viewing a single comment's thread. Return to all comments →
Using swapcase
def swap_case(s): return s.swapcase()
or I also did
def swap_case(s): string = [] for i in s: for j in i: if i.isupper(): string.append(i.lower()) elif i.islower(): string.append(i.upper()) else: string.append(i) return ''.join(string)
return ''.join(string)
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 →
Using swapcase
or I also did