This has likely been asked before, but does anyone know of an elegant way to implement argmin in Python? That is, given a dictionary D mapping integers to integers, I want to find the key k such that D[k] is minimized.
For example:
d = {1: 100, 2:200}
argmin(d) = 1