Dictionary: items and iteritems
d = {'title': 'Python Web Site', 'url': 'http://www.python.org', 'spam': 0}
#The iteritems method works in much the same way, but returns an iterator instead of
#a list.
it = d.iteritems()
print it
Related examples in the same category