Given a dictionary d , where a pair of key values โโconsists of a string as a key and an integer as a value, I want to print a key string where the value is the maximum.
Of course, I can d.items() over d.items() , save the maximum and its key and print the last one after the for loop. But is there a more "pythonic" way using only the max function construct, such as
print max(...)
python max
halloleo
source share