Paul Rubin wrote:
> "MonkeeSage" <[EMAIL PROTECTED]> writes:
> > Ps. I don't know if xrange is faster...I thought the difference was
> > that range created a temporary variable holding a range object and
> > xrange created an iterator?
>
> There's no such thing as a "range object"; range creates a list, which
> consumes O(n) memory where n is the number of elements.  xrange
> creates an xrange object, which is a reusable iterator of sorts.

Aha, thanks for explaining. :)

Regards,
Jordan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to