Skip to content

Instantly share code, notes, and snippets.

@vchahun
Created April 6, 2012 00:46
Show Gist options
  • Select an option

  • Save vchahun/2315548 to your computer and use it in GitHub Desktop.

Select an option

Save vchahun/2315548 to your computer and use it in GitHub Desktop.
Dictionary assignment in a loop
l = [(1, 2), (3, 4), (5, 6)]
d = {}
for d['a'], d['b'] in l:
print d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment