from collections import OrderedDict # Remembers the order the keys are added! x = OrderedDict(a=1, b=2, c=3)