d = {1:2,3:1,44:5,4:5,7:8}l = d.items() #转换为列表print(l) # dict_items([(1, 2), (3, 1), (44, 5), (4, 5), (7, 8)])根据字典value排序:sorted(d.items(), key = lambda x:x[1])倒序sorted(d.items(), key = lambda x:x[1], reverse = True) enumerate()说明 enumerate()是python…