question on list comprehensions

Darren Dale dd55 at cornell.edu
Thu Oct 14 11:02:32 EDT 2004


Fredrik Lundh wrote:

> Darren Dale wrote:
> 
>> I need to replace the following loop with a list comprehension:
>>
>> res=[0]
>> for i in arange(10000):
>>     res[0]=res[0]+i
> 
> why?
> 
> </F>

I explained why in the original post...



More information about the Python-list mailing list