My dict is like,
{'A':4,'B':10,'C':0,'D':87}
I want to find max value with its key and min value with its key.
Output will be like ,
max : 87 , key is D
min : 0 , key is C
I know how to get min and max values from dict. Is there is any way to get value and key in one statement?
max([i for i in dic.values()])
min([i for i in dic.values()])