def fc_range(start, end, step=1.0):
while start < end:
yield start
start +=step
for x in fc_range(0, 1, 0.05):
print x # look the ans
print list(fc_range(0, 1, 0.05)) # compare the ans now
and when I test this:
>>> 0.1 + 0.05
0.15000000000000002
it seems like to be clear, but why when I use print
the answer is not 0.15000000000000002
?