[docs] Extra list comprehension example
ruud at stack.nl
Mon Apr 26 10:46:53 CEST 2010
On Mon 26 Apr 2010 10:42 AM, Ruud Althuizen wrote:
> I was struggling to find an example of list comprehension for a specific
> situation. The current examples only show if you want to:
> - Use two loops concurently using non-dependent iterations
> - Swap values
> My situation is related to option 1: use one loop that depends on the other
I just read this line from section 5.1.5: "To avoid apprehension when
nesting list comprehensions, read from right to left."
I must've read over that bit the first thousand times. Adding the example
probably makes it more obvious.
Met vriendelijke groet,
- Unix commissie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the docs