Can anyone tell me how I can sort this:
{\'a\': [1, 2, 3], \'c\': [\'one\', \'two\'], \'b\': [\'blah\', \'bhasdf\', \'asdf\'], \'d\': [\'asdf\', \'wer\', \'a
As the other answer mentioned, the order of a dictionary's keys is arbitrary and you shouldn't rely on it.
If you're using Python 2.7 or 3.1 or later, try out collections.OrderedDict
(2.7 docs; 3.1 docs; also see PEP 372). There's a link in the docs to a pure-Python version of OrderedDict that works on earlier Python versions.