Is there a way to step between 0 and 1 by 0.1?
I thought I could do it like the following, but it failed:
for i in range(0, 1, 0.1): print i
scipy has a built in function arange which generalizes Python's range() constructor to satisfy your requirement of float handling.
scipy
arange
range()
from scipy import arange