I want to return the maximum value and its key from a dictionary, and I know that something like the following should do the trick
max(list.iteritems(), key=operator.itemgetter(1))
However in case that the maximum value in a dictionary is 6 and it happens that multiple keys have the same value .. it will always return the first one ! how can I make it return all the keys that has the maximum number as values along with the value. Here is an example of a dictionary with the same maximum value:
dic={0: 1.4984074067880424, 1: 1.0984074067880423, 2: 1.8984074067880425, 3: 2.2984074067880425, 4: 2.2984074067880425}