News for hackers. Stuff that matters.
Re:How to Write a Spelling Corrector by andreasvc on Friday October 05, 2012 @07:55PM (#4619232)
It's not necessarily the inner argument that's written first:

    >>> [a for a in range(3) for b in range(2)]
    [0, 0, 1, 1, 2, 2]
It's just that for every iteration of the inner loop, it is evaluated and added to the result.

Once you keep in mind that their order has the same meaning as with normal for loops it's not so tricky. You can even indent them that way to make that more obvious.

There are no comments on this comment yet.