On Wed, 10 Nov 2010 09:34:14 -0800, xoff wrote: > I am curious, why wouldn't you advise something like this: > for i in chain(range(3,7) + range(17,23)): Because it constructs all three lists (both of the individual ranges and their concatenation) in memory. For a trivial example, that isn't a problem; for a real application, it could be.