Skip to content

Instantly share code, notes, and snippets.

@jherrlin
Created January 11, 2016 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jherrlin/22238fa00d4f73aa2a2d to your computer and use it in GitHub Desktop.
Save jherrlin/22238fa00d4f73aa2a2d to your computer and use it in GitHub Desktop.
d = {
'name': 'john',
'age': 30,
'city': 'Vaxjo'
}
for key, value in d.items():
print(key, value)
# Replace all
for key, value in d.items():
d[key] = 666
for key, value in d.items():
print(key, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment