dict.items vs dict.iteritems


/ Published in: Python
Save to your folder(s)

When is it appropriate to use dict.items() vs dict.iteritems?


Also, when is it appropriate to use range() vs xrange(). From my
understanding, xrange() essentially gives you an iterator across a
range, so it should be used when iterating. Should you only use
range() when want to physically store the range as a list?

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.