Oct-05-2017, 04:07 PM
Im trying to create a dicctionary using two lists (one as a key and the other one as a value) like this:
list1 = ['A4', 'A9', 'A2'] # keys
list2 = [27.8, 7.1, 68.04] # values
Diccionary : {'A4': [27.8], 'A9': [7.1], 'A2': [68.04]}
Finally I need to sort by value and take the minimum value and key:
In this case: {'A9':[7.1]}
Thanks in advance
list1 = ['A4', 'A9', 'A2'] # keys
list2 = [27.8, 7.1, 68.04] # values
Diccionary : {'A4': [27.8], 'A9': [7.1], 'A2': [68.04]}
Finally I need to sort by value and take the minimum value and key:
In this case: {'A9':[7.1]}
Thanks in advance