📜  python 查找字典中的最小元素 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.092000             🧑  作者: Mango

代码示例2
d = {'A': 4,'B':10}
min_v = min(zip(d.values(), d.keys()))
# min_v is (4,'A')

max_v = max(zip(d.values(), d.keys()))
# max_v is (10,'B')