I am curious about a thing:
I have a dict, for example with a car as key and a value regarding its speed. Now, I want to find the key with the lowest value.
well I'm not sure what is the run time of this one but you can try it it works for me :
>>> d = {'mercedes': 200, 'fiat': 100, 'porsche': 300, 'rocketcar': 600}
>>> d.items()
[('mercedes', 200), ('fiat', 100), ('porsche', 300) , ('rocketcar',600)]
>>> # find the minimum by comparing the second element of each tuple
>>> min(d.items(), key=lambda x: x[1])
('fiat', 100)