[Python-ideas] while conditional in list comprehension ??
Wolfgang Maier
wolfgang.maier at biologie.uni-freiburg.de
Mon Jan 28 23:01:40 CET 2013
>Ethan Furman <ethan at ...> writes:
>
> Well, as long as we're dreaming, how about
>
> [n for n in l while 10 <= n < 20]
>
> and somebody (else!) can code to skip until the first condition is met,
> then keep until the second condition is met, and then stop.
>
> :)
Sounds great ;)
Here it's 11 p.m. so dreaming sounds like a reasonable thing to do,
Wolfgang
More information about the Python-ideas
mailing list