Replace String By Index Python Dictionary Example