You are viewing a single comment's thread. Return to all comments →
Python 2: made use of string library. from string import ascii_lowercase, ascii_uppercase sortkey = ascii_lowercase + ascii_uppercase + "1357902468"
from string import ascii_lowercase, ascii_uppercase sortkey = ascii_lowercase + ascii_uppercase + "1357902468"
print reduce(lambda x,y: x+y, sorted(raw_input(),key=sortkey.index))
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 →
Python 2:
made use of string library.
from string import ascii_lowercase, ascii_uppercase
sortkey = ascii_lowercase + ascii_uppercase + "1357902468"
print reduce(lambda x,y: x+y, sorted(raw_input(),key=sortkey.index))