Nokia interview question

Basic python codes Data structure