Python: Maintaining order in Dictionaries

Maintaining order in Dictionaries in Python

Maintaining order in Dictionaries: The regular behaviour of Python dictionaries is such that, the order in which the key-value pairs are declared is not necessarily the order in which they are stored in memory. For example: