Here is the dictionary looks like:
{\'57481\': 50, \'57480\': 89, \'57483\': 110, \'57482\': 18, \'57485\': 82, \'57484\': 40}
I would
Standard Python dicts are "unordered". You can use an OrderedDict, take a look at the docs:
from collections import OrderedDict
d = {'57481': 50, '57480': 89, '57483': 110, '57482': 18, '57485': 82, '57484': 40}
OrderedDict(sorted(d.items(), key=lambda t: t[0]))
# OrderedDict([('57480', 89), ('57481', 50), ('57482', 18), ('57483', 110), ('57484', 40), ('57485', 82)])