Skip to content

Instantly share code, notes, and snippets.

@mittenchops
Last active December 15, 2015 16:59
Show Gist options
  • Save mittenchops/5292917 to your computer and use it in GitHub Desktop.
Save mittenchops/5292917 to your computer and use it in GitHub Desktop.
Python make a dynamic dictionary
x = set(['a', 'b'])
y = {}
y.update({r:'' for r in x if r is not ''})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment