Python 3.6 (CPython)
As of Python 3.6, for the CPython implementation of Python, dictionaries maintain insertion order by default. This is considered an implementation detail though; you should still use
collections.OrderedDict if you want insertion ordering that's guaranteed across other implementations of Python.
Python >=2.7 and <3.6
collections.OrderedDict class when you need a
dict that remembers the order of items inserted.