You are viewing a single comment's thread. Return to all comments →
My solution used python 2:
print reduce(lambda x,y: x+y, sorted(raw_input(), key=lambda x: (x.isdigit(), x.isdigit() and int(x)%2==0, x.isupper(), x.islower(), x)))
Seems like cookies are disabled on this browser, please enable them to open this website
ginortS
You are viewing a single comment's thread. Return to all comments →
My solution used python 2:
print reduce(lambda x,y: x+y, sorted(raw_input(), key=lambda x: (x.isdigit(), x.isdigit() and int(x)%2==0, x.isupper(), x.islower(), x)))