is list comprehension necessary?

Andre Alexander Bell post at andre-bell.de
Tue Oct 26 15:00:34 EDT 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