June 28, 2013
11:50 p.m.
On Fri, Jun 28, 2013 at 7:38 PM, Shane Green <shane@umbrellacode.com> wrote:
.. [x until condition for x in l ...] or [x for x in l until condition]
Just to throw in one more variation: [expr for item in iterable break if condition] (inversion of "if" and "break"reinforces the idea that we are dealing with an expression rather than a statement - compare with "a if cond else b")