WolframLang: Create Flat List (Range)
Range
Range
-
range[max]
range[min, max]
range[min, max, step]
return a flat list.
Like Python range but more powerful. Argument needs not be integer.
Range[5] === {1, 2, 3, 4, 5} (* min to max *) Range[4, 8] === {4, 5, 6, 7, 8} (* step of 0.5 *) Range[1, 3, 0.5] === {1., 1.5, 2., 2.5, 3.} (* symbolic step *) Range[1, 3, 1/2] === {1, 3/2, 2, 5/2, 3} (* negative step *) Range[1, -1, -0.5] === {1., 0.5, 0., -0.5, -1.} (* any arg can be symbolic *) Range[0, 3 Pi, Pi/2] === {0, Pi/2, Pi, (3*Pi)/2, 2*Pi, (5*Pi)/2, 3*Pi}