Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ah, Python...
from collections import Counter
def sort(lst):
return [i for i, n in Counter(lst).items() for _ in range(n)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment