Python Dictionary Update Function In Python