9951 explained code solutions for 126 technologies


python-numpyGet evenly spaced values from given interval with custom step


import numpy as np 
a = np.arange(10, 20, 3)ctrl + c
import numpy as np

load Numpy module for Python

.arange(

generates evenly spaced array based on specified range

10, 20

range to generate array from (from 10 inclusive to 20 not inclusive in our case)

, 3

step size for generated values