This comes up so often on this list that there are many examples and recipes. You are looking for a dictionary sort by value. search strategy: Python sorting dictionary
44,000+ hits on google. First entry: http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306 hth, M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list