I want to sort a dictionary descending by number and then ascending alphabetically

前端 未结 0 1187
走了就别回头了
走了就别回头了 2020-12-30 05:52

I have this code

L = [\'c\', \'c\', \'b\', \'a\',\'b\']
from collections import Counter
import numpy as np
x = Counter(L)
dict1 = {k: v for k, v in sorted(x.i         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题