We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
for i in s:
if i.isupper():
i = i.lower()
new_string = new_string + i
elif i.islower():
i = i.upper()
new_string = new_string + i
else:
new_string = new_string + i
return new_string
Cookie support is required to access HackerRank
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): new_string = '""