My goal is to preserve the ordering of keys in a dictionary declaration. I am using collections.OrderedDict
but when I run:
>>> modelConfigBase = OrderedDict({'FC':'*','EC':'*','MP':'*','LP':'*','ST':'*','SC':'*'})
The order changes:
>>> modelConfigBase
OrderedDict([('EC', '*'), ('ST', '*'), ('FC', '*'), ('MP', '*'), ('LP', '*'), ('SC', '*')])
What am I doing wrong?