As a python newbie, I have a dictionary d:
d={'a':{'1':4,'2':6},'b':{'1':5,'2':10}}
I need to find for each key ('a','b') the sub-key for the highest value and bundle them together in a new dictionary, newd, which looks like
newd={'a':'2', 'b':'2'}
what is the best way to achieve this?