Can anyone tell me how I can sort this:
{\'a\': [1, 2, 3], \'c\': [\'one\', \'two\'], \'b\': [\'blah\', \'bhasdf\', \'asdf\'], \'d\': [\'asdf\', \'wer\', \'a
It may also be worth mentioning the nlargest routine in heapq. This sorts and returns the top N items. Depending upon what is actually required, this may be handy if you play with the key parameter. I mainly mention this since I discovered it a couple of nights ago and it did exactly what I was after. See PEP 0265 and Heapq.