You are viewing a single comment's thread. Return to all comments →
s = input() def sorting_function(c: str): if c.islower(): return ord(c) if c.isupper(): return ord(c) + 200 c = int(c) if c % 2: return 400 + c return 600 + c print("".join(sorted(s, key=sorting_function)))
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
ginortS
You are viewing a single comment's thread. Return to all comments →