is list comprehension necessary?

Andre Alexander Bell post at andre-bell.de
Tue Oct 26 21:00:34 CEST 2010


On 10/26/2010 07:22 PM, Ian Kelly wrote:
>     >>> i = 5
>     >>> l = [i**2 for i in range(3)]
>     >>> i
>     2
> 
> 
> This has been corrected in Python 3.

Sorry. You're right. I forgot to mention that...


Andre



More information about the Python-list mailing list