I'm currently learning Python as a student, but I can't seem to grasp the idea of dictionary.
Let's say
d = {'I': 1, ' ': 2, 'P': 1, 'L': 1, 'E': 3, 'H': 1, 'D': 1, 'N': 1}
I want to to use the function max
to return the key which has the highest value.
max (d.values(), key = lambda x: x[0])
But I get an error which say
TypeError: 'int' object is not subscriptable