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.
defswap_case(s):#print(s[0])x=0#or you can just use swapcase()t=list(s)foriins:if(i.isupper()):# = i.lower()t[x]=(s[x].lower())x=x+1elif(i.islower()):#i = i.upper()t[x]=(s[x].upper())x=x+1else:t[x]=s[x]x=x+1v=''.join(t)returnv
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 →