[Tutor] for _ in

Joson zhuchunml at gmail.com
Tue Mar 9 04:25:19 CET 2010

Hi all,
source code as below puzzles me:

def make_sparse_labeled_tensor(ndim, labels=None,
                               initial=None, accumulate=None,
        if labels is None: labels = [OrderedSet() for _ in xrange(ndim)]

It's a library named "divisi". "OrderedSet" is a string set defined in this
lib. "ndim" is integer.  What's the meaning of "for _ in" ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100309/831184ef/attachment.html>

More information about the Tutor mailing list