Feb-27-2018, 02:23 AM
given 4 ints which define 2 ranges, i can do
foo = [x for x in range(a,b)]+[x for x in range(c,d)]but it would be nice if there was a more compact form like
foo = range(a,b,1,c,d,1) # warning: invalid codeanyone know of a compact way to join multiple ranges preferably in a range-like object? otherwise, i'm thinking of making a generator to do this.