In Python, you can easily generate a list of numbers using numpy.arange([start, ]stop, [step, ]dtype=None) function. The example below will create an array of numbers between 1 and 10. And, each number is spaced 1 unit(step) apart.

import numpy as np range = np.arange(start = 1, stop = 10, step = 1, dtype='int') print(range)

**Output**

[1 2 3 4 5 6 7 8 9]

# Github

- https://github.com/xuanngo2001/python-examples/blob/master/numpy/numpy-arange.py