for with decimal values?

Pascal Chambon chambon.pascal at wanadoo.fr
Sat May 2 11:50:42 EDT 2009


Aahz a écrit :
> In article <mailman.4975.1241277173.11746.python-list at python.org>,
> Esmail  <ebonak at hotmail.com> wrote:
>   
>> 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).
>>     
>
> Write a function
>   
Else you can work on integers - for i in range (-105, 105) - and divide 
by ten just below... but concerning performances I don't know if it's a 
good idea ^^

Regards,
Pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090502/d4c4af4d/attachment.html>


More information about the Python-list mailing list