You are viewing a single comment's thread. Return to all comments →
A little bit more concise way to perform this method
from collections import defaultdict n = int(raw_input().strip()) bucket = defaultdict(list) for _ in xrange(n): number = raw_input().strip() bucket[len(number)].append(number) for key in sorted(bucket): for value in sorted(bucket[key]): print(value)
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 →
A little bit more concise way to perform this method