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.
Even though i solved it in first attempt within seconds i feel like noob watching people giving 1 liners :/
s=raw_input()
x=[]
for i in s:
if i.isupper():
i=i.lower()
x.append(i)
else:
i=i.upper()
x.append(i)
str1=''.join(x)
print str1
sWAP cASE
You are viewing a single comment's thread. Return to all comments →
Even though i solved it in first attempt within seconds i feel like noob watching people giving 1 liners :/ s=raw_input() x=[] for i in s: if i.isupper(): i=i.lower() x.append(i) else: i=i.upper() x.append(i) str1=''.join(x) print str1