Skip to content

Instantly share code, notes, and snippets.

@igorgue
Created July 11, 2009 16:00
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 igorgue/145293 to your computer and use it in GitHub Desktop.
Save igorgue/145293 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
d1 = {'a': 1}
d2 = {'a': 1, 'b': 2}
l = [d1, d2, d1, d2]
for i in l:
i.pop('b', None)
print l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment