Hello!

How can I convert this piece of code from Design Script into Python:

0…#x…#y;

A sequence of numbers from 0 to N(x) given the step(y).

I haven’t achieved it with range(0,x,y) because it returns a range from 0 to x, not a list of x numbers.

Attached is the desired result.

thanks!

@DavidMena You can do something like this:

```
start = IN[0] if IN[0] else 0
numbers = IN[1]
step = IN[2] if IN[2] else 1
OUT = [step*i+start for i in range(numbers)]
```

1 Like

OUT = range(0, IN[0]*IN[1], IN[1])

1 Like

And note: range works for numbers and letters…

range (start, stop, step)

Here is the doc for Python range function

https://docs.python.org/3/library/stdtypes.html#range

1 Like