Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created May 31, 2010 11:17
Show Gist options
  • Save qoelet/419745 to your computer and use it in GitHub Desktop.
Save qoelet/419745 to your computer and use it in GitHub Desktop.
>>> mydict = {'a':1, 'b':2}
>>> for something in mydict.iteritems():
... print something
...
('a', 1)
('b', 2)
>>> for key, value in mydict.iteritems():
... print key, value
...
a 1
b 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment