"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Chaos, > > Then of course if you do the whole thing many times you could just > pre-generate the indices as in: > all_indices=[] > for i in xrange(thisHeight): > for j in xrange(thisWidth): > all_indices.append( (i,j) ) >
Or just: all_indices = [ (i,j) for i in xrange(thisHeight) for j in xrange(thisWidth) ] Embrace those list comprehensions! -- Paul -- http://mail.python.org/mailman/listinfo/python-list