<float>range(0.0,100.0,0.1)
Remco Gerlich
scarblac-spamtrap at pino.selwerd.nl
Wed May 17 18:30:00 EDT 2000
Michael Hudson wrote in comp.lang.python:
> for i in map(lambda x:x/10,range(1000)):
> print i
>
> ? This is probably the best solution wrt roundoff; beware of
> repeatedly adding 0.1 to floats...
Divide by 10.0 then, to force the values to become floats...
--
Remco Gerlich, scarblac at pino.selwerd.nl
Murphy's Rules, "Butterfingers!":
In Hero Games' Champions, the probability of an average person being
able to grab something off the table (such as a soft-drink bottle) is
25 per cent.
More information about the Python-list
mailing list