unintuitive for-loop behavior

Terry Reedy tjreedy at udel.edu
Sat Oct 1 16:19:56 EDT 2016


On 10/1/2016 8:24 AM, Rustom Mody wrote:

> Yeah by comprehension-variable I mean the one that sits left of the
> ‘in’ inside the conprehension.

In other words, a 'loop variable within a comprehension'.  Keep in mind 
that there may be multiple targets for the implicit (hidden) assignment, 
so there may be multiple loop (comprehension) variables even without 
nested loops.

-- 
Terry Jan Reedy





More information about the Python-list mailing list