IBM interview question

Standard dictionary problem in Python