Jun-08-2020, 04:11 PM
I think you are trying to look up the value in dict2 for each of the numbers in dict1 (like 1, 2, 3, 4, etc.)
But the values in dict1 aren't numbers, they're sets of numbers. So your program is trying to find the value of the set itself, and that's not possible.
If you want to unpack the sets, maybe import
But the values in dict1 aren't numbers, they're sets of numbers. So your program is trying to find the value of the set itself, and that's not possible.
If you want to unpack the sets, maybe import
itertools
and then you canprint(max(list(itertools.chain.from_iterable(dict1.values())),key=dict2.get))