I am having a doubt in a question
write a program to insert items at the beginning of the ordered dict.
Examples –
Input:
original_dict = {'a':1, ‘b’:2}
item to be inserted ('c', 3)
Output: {'c':3, ‘a’:1, ‘b’:2}
Input:
original_dict = {'akshat':1, ‘manjeet’:2}
item to be inserted ('nikhil', 3)
Output: {'nikhil':3, ‘akshat’:1, ‘manjeet’:2}
How to do this?