def get_rand_min(d):
    min_val = min(d.values())
min_keys = [k for k in d if d[k] == min_val]
return random.choice(min_keys)
Python: get key with the least value from a dictionary BUT multiple minimum values