The specification for the built-in dictionary type
disclaims any preservation of order, it is best to think of a dictionary as an unordered set of key: value pairs...
You may want to check the OrderedDict module, which is an implementation of an ordered dictionary with Key Insertion Order.