So let's say I have the following dictionary:
dic = {'a':3, 'b':2, 'c':1, 'd':1}
So I want to pop (or any other method, that remove and return) 'd'
because it is the lowest
Value and the right most item (in case 2 keys have the same value), values will always be ints.
I tried:
dic.popItem()
But I'm just getting a random item back, any ideas?
Also tried:
temp = min(dic.values)
del dic[temp]
But again, it's not working!