Works fine here. It won't work if you copied it from @takluyver 's  comment because he's missing a `,` between `'hang'` and `'me'`. 

You should write it like this because the way it is now raises IndexErrors in some cases. If for example the player says 'you will' it will start checking d[0], then d[1], then d[2]... but d[2] doesn't exist which causes the IndexError and crashes the game.