i=2; lst=[i**=2 while i<1000]

D H x at y.z
Tue Dec 6 09:26:34 EST 2005


bonono at gmail.com wrote:
>>You can use i**=2 for i in range(1000) instead
> 
> 
> I don't think one can use assignment in list comprehension or generator
> expression. The limitation is very much like lambda.
> 

i**2



More information about the Python-list mailing list