xoff <igor.idziejc...@gmail.com> writes:
> I am curious, why wouldn't you advise something like this:
> for i in chain(range(3,7) + range(17,23)):

First of all, the outer chain does nothing.  Second, concatenating the
two lists creates a new list, consuming storage and taking time copying
all the elements.  Third, if there are n lists instead of two, I think
the copying time is O(n**2) in the number of lists because there are n-1
separate copy operations and they keep getting larger.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to