Given a dictionary:
d = {'a':{'priority': 10}, 'b': {'priority':20}} Can I return the keys in a sorted order by priority (in a dict in the value)?
Something like:
>>> print sorted_list ['b', 'a'] Given a dictionary:
d = {'a':{'priority': 10}, 'b': {'priority':20}} Can I return the keys in a sorted order by priority (in a dict in the value)?
Something like:
>>> print sorted_list ['b', 'a']