How can I convert this piece of code from Design Script into Python:
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.
@DavidMena You can do something like this:
start = IN if IN else 0 numbers = IN step = IN if IN else 1 OUT = [step*i+start for i in range(numbers)]
OUT = range(0, IN*IN, IN)
And note: range works for numbers and letters…
range (start, stop, step)
Here is the doc for Python range function