Bluewhirl interview question

Realated to python data structure