Have a look at the arange() function in the Python tutorial.