I've listed all over SO but didn't find the correct answer for my situation. I found this code to sort a dictionary:
min_key = sorted(d.items(), key=lambda x:x[1])[0]
And it does the sorting right, but now I need to run this code for
{ '10.8.68.192': 9, '10.8.69.42': 9}
and for
{ '10.8.69.42': 9, '10.8.68.192': 9 }
and I need it return '10.8.68.192' no matter in what order are they(if values are same sort by key). Any ideas ?