I have a dictionary:
d = {'a': (1, 2, 'a'), 'b': (1, 2, 'b'), 'c': (2, 4, 'c'), 'd': (1, 3, 'd'), 'e': (0, 1, 'e'), 'f': (0, 1, 'f'), 'g': (1, 3, 'g'), 'h': (0, 1, 'h'), 'j': (1, 2, 'j'), 'i': (0, 1, 'i'), 'k': (-1, 0, 'k')}
And I want to find which one is the minimum of all the values in the dictionary. However, on the last key (k) there is a -1.
How can I ignore that key/value without removing it? Or is the only way to remove :
'k': (-1, 0, 'k')
and then use min().
Here is my code:
print(min(d.values()))
Current output:
(-1, 0, 'k')
Expected output:
(0, 1, 'e')