Python Dictionary Interview Question