[docs] Extra list comprehension example

Ruud Althuizen ruud at stack.nl
Mon Apr 26 10:46:53 CEST 2010

On Mon 26 Apr 2010 10:42 AM, Ruud Althuizen wrote:
> Hello,
> 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
> loop.
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,
Ruud Althuizen
- www.stack.nl
- Unix commissie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20100426/7328d895/attachment.pgp>

More information about the docs mailing list