method 1
list1 = [‘1’,‘2’,‘3’]
list2 = [‘a’,‘b’,‘c’]
dict1 = dict(map(lambda x,y:[x,y],list1,list2))
result
print(dict1)
[Out] {‘1’: ‘a’, ‘2’: ‘b’, ‘3’: ‘c’}
method 2
dict(zip(list1,list2))
[Out] {‘1’: ‘a’, ‘2’: ‘b’, ‘3’: ‘c’}
求最小的 value
minValue = min(dict1.values())
通过遍历,通过值求键
for k,v in dict1.items():
if v == minValue:
print(k)