Everyone has given great answers
however I thought why not a general function to solve this problem
i.e without knowing the range in advance (in this case range is 0-31)
>>> l=[]
>>> def addNumFun(startRange, endRange, interval):
init = str(interval)[::-1].find('.')
start = int(startRange * (10**init))
end = int(endRange * (10**init))
for i in range(start,end):
l.append(i/(10**init))
l.append(end/(10**init)) # to add the last number of range
>>> addNumFun(0.9,1.2,0.01)
>>> l
[0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.2, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.2]
i / 100.0. And why you make float from float infloat(0.9)?