Laurent Pointal <[EMAIL PROTECTED]> writes: > Both work, you may prefer xrange/iteritems for iteration on large > collections, you may prefer range/items when processing of the result > value explicitly need a list (ex. calculate its length) or when you are > going to manipulate the original container in the loop.
You can use len(d) if d is a dict. -- http://mail.python.org/mailman/listinfo/python-list