Esmail <[email protected]> writes:
> Hello all,
>
> Is there a Python construct to allow me to do something like
> this:
>
> for i in range(-10.5, 10.5, 0.1):
> ...
>
> If there is such a thing already available, I'd like
> to use it, otherwise I can write a function to mimic this,
> but I thought I'd check (my search yielded nothing).
>
> Thanks,
> Esmail
In this particular example, you could do this:
for i in range(-105, 105):
i = 0.1*i
...
In general, you'd have to write your own (generator) function.
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list