python 自带的range是不能实现对小数的操作的,如果要对小数操作可以使用numpy

import numpy as np
s = np.arange(0, 1, 0.1)
print s
[0.  0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]


原文地址:https://www.cnblogs.com/nyist-xsk/p/9730174.html