iteritems method returns an iterator instead of a list : Iteritems : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Iteritems »

 

iteritems method returns an iterator instead of a list


d = {'title': 'Python Web Site', 'url': 'http://www.python.org', 'spam': 0}

it = d.iteritems()
print it
print list(it# Convert the iterator to a list



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Dictionary
» Iteritems