python dict按value排序

https://stackoverflow.com/questions/613183/how-do-i-sort-a-dictionary-by-value

sort_tuple_list = sorted([(value,key) for (key,value) in mydict.items()])

你可能感兴趣的:(Python)