Rather Than Explaining The Theoretical Part I'll Give A Simple Example.
>>> from collections import OrderedDict
>>> my_dictionary=OrderedDict()
>>> my_dictionary['foo']=3
>>> my_dictionar['aol']=1
>>> my_dictionary
OrderedDict([('foo', 3), ('aol', 1)])