Jun-08-2020, 01:39 PM
Hi all
I have two dictionaries, containing (for example):
I do:
What am I doing wrong?
I have two dictionaries, containing (for example):
dict1 = {'k1':{1,2,3},'k2':{4,5,6},'k3':{7,8,9}} dict2 = {1:12,2:23,3:34,4:45,5:56,6:67,7:78,8:89,9:90}I want to find the dict1 set value, having max of dict2 value.
I do:
print(max(list(dict1.values()),key=dict2.get))and get "TypeError: unhashable type: 'set'"
What am I doing wrong?