"random python dictionary key, weighted by values",random.choice([k for k in d for x in d[k]])