You are viewing a single comment's thread. Return to all comments →
Lambda works efficiently in this too.
n = int(input()) unsorted = [input() for _ in range(n)] unsorted.sort(key = lambda x: (len(x), x)) print('\n'.join(unsorted))
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
Lambda works efficiently in this too.