Nokia interview question

About data structures in python