Skip to content

Instantly share code, notes, and snippets.

@vandersonmota
Created June 15, 2011 16:34
Show Gist options
  • Save vandersonmota/1027494 to your computer and use it in GitHub Desktop.
Save vandersonmota/1027494 to your computer and use it in GitHub Desktop.
#Better:
if key not in d: d[key] = []
# Even Better
d.get(key, [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment