RS
Size: a a a
RS
RS
А
items = [4, 6, 2, 2, 6, 4, 4, 4]
print(sorted(items, key = lambda x: items.count(x),reverse = True))
[4,4,4,4,6,2,2,6]
[4,4,4,4,6,6,2,2]
RS
RS
А
RS
А
yh
RS
AT
from collections import Counter
c = Counter(items)
res = []
for k, v in sorted(c.items(), key=lambda x: x[1], reverse=True):
res += [k] * v
l
output = [x[1] for x in L]
yh
Ю
output = [x[1] for x in L]
RS
output = [x[1] for x in L]
А
output = [x[1] for x in L]
RS
Р
А
Ю