for with decimal values?

Zentrader zentraders at gmail.com
Sun May 3 16:41:49 EDT 2009


There is no need for a function or a generator.  A for() loop is a
unique case of a while loop
## for i in range(-10.5, 10.5, 0.1):
ctr = -10.5
while ctr < 10.5:
   print ctr
   ctr += 0.1



More information about the Python-list mailing list