mydict = {
'Li':['M',7],
'Zhang':['E',2],
'Wang':['P',3],
'Du':['C',2],
'Ma':['C',9],
'Zhe':['H',7]
}
res = sorted(mydict.items(),key=lambda x:x[1][1])#根据value结构[m,n]中n的值进行排序
print(res)
#输出
#[('Zhang', ['E', 2]), ('Du', ['C', 2]), ('Wang', ['P', 3]), ('Li', ['M', 7]), ('Zhe', ['H', 7]), ('Ma', ['C', 9])]