You are viewing a single comment's thread. Return to all comments →
Your code as one line.
[i[0] for i in sorted(enumerate(orders, 1), key = lambda x: sum(x[1]))]
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.
Jim and the Orders
You are viewing a single comment's thread. Return to all comments →
Your code as one line.
[i[0] for i in sorted(enumerate(orders, 1), key = lambda x: sum(x[1]))]