I have a dictionary: D = {'N':5, 'S':0, 'W':6, 'E':1} and I want to get key with maximum value among D['N'] and D['S'].
For example I tried code print(lambda k: max(k['N'], k['S'])(k=D.keys())) but it returns lambda object like this <function <lambda> at 0x000002C7B060C1E0>. Although I wanna get N in output.
Need help. Thanks!