Range with custom steps

Hello!
I’m stuck with a number sequence. Let’s say I need a sequence from 0 to 930 but I want to give the pattern how the numbers are added. This case I need 100,110,100 pattern 3 times, so my list will be:
0,100,210,310,410,520,620,720,830,930

The fun part would be to throw any 1-4 number and that could be used as a pattern for the sequence. I would always choose numbers that can be divided round with the end of the range.

mylist = [0]
pattern = [100,110,100]
maxval = 930
i = 0
while i < maxval:
    for a in pattern:
        b=i+a
        mylist.append(b)
        i += a

print mylist

In dynamo:

Capture
image

1 Like

working! thank you