On 11/10/2010 9:34 AM xoff said...
On 10 nov, 18:15, Paul Rubin<no.em...@nospam.invalid>  wrote:
potentially lots of storage (you should use xrange instead).  On the
other hand you could just concatenate the lists with +, but I wouldn't
advise that.

I am curious, why wouldn't you advise something like this:
for i in chain(range(3,7) + range(17,23)):


I'd assume because concatenation is generally considered expensive.

If you were to do it, you'd likely drop the chain and write:

for i in range(3,7) + range(17,23):

Emile

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

Reply via email to