Does Python store dictionary elements in any particular order?
Question :
Does Python store dictionary elements in any particular order?
No, python does not store dictionary elements in any particular order. If we enter elements in one order, they may be stored in another (essentially random) order inside Python. For example,
>>> D1 = { ' sleep' : " All night ", 'work' : "All day"}
>>> D1
{ 'work' : 'All day', 'sleep' : 'All night' }