variable scope in list comprehensions

Piotr Sobolewski NIE_DZIALA at gazeta.pl
Sat Apr 5 01:22:58 EDT 2008


Duncan Booth wrote:

> For the OP, in some languages (e.g. C) 'for' loops typically calculate
> the value of the loop control variable based on some expression
> involving the previous value. Python isn't like that. In Python the data
> used to compute the next value is stored internally: you cannot access
> it directly.

Great! Now everything is clear.

Thanks!




More information about the Python-list mailing list