I have a collections.defaultdict(int) that I\'m building to keep count of how many times a key shows up in a set of data. I later want to be able to sort it (obviously by turnin
To get the dictionary sorted:
from operator import itemgetter sorted(adict.iteritems(), key=itemgetter(1), reverse=True)