一.字典元素排序 dict.keys(),dict.values(),dict.items() 结合max.min.sorted.zip进行排序是个很好的办法,另外注意不使用zip时,字典的lambda操作方法: price = { 'a':1, 'b':2, 'c':3 } # 多个键的值相同时会采取元组比较的形式,实际应用时注意 min_p = min(zip(price.values(), price.keys())) max_p = max(zip(price.values(), pri…