📅  最后修改于: 2022-03-11 15:00:06.636000             🧑  作者: Mango
from collections import Counter
print [item for items, c in Counter(a).most_common() for item in [items] * c]
# [5, 5, 5, 5, 3, 3, 3, 4, 4, 4, 1, 1, 2]