Skip to content

Instantly share code, notes, and snippets.

@chrisglass
Last active August 29, 2015 14:02
Show Gist options
  • Save chrisglass/cf35ded9f81bd99ca083 to your computer and use it in GitHub Desktop.
Save chrisglass/cf35ded9f81bd99ca083 to your computer and use it in GitHub Desktop.
mondict = {"blah": "foo"}
def une_fonction(undict):
undict["blah"] = "bar"
une_fonction(mondict)
print mondict # C'est "{'blah': 'bar'}
# A l'invere
monstring = "blah"
def une_autre_fonction(unstring):
unstring = "foo"
une_autre_fonction(monstring)
print monstring # C'est "blah"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment