urikaluzhny wrote:
| It seems that I rather frequently need a list or iterator of the form | [x for x in <> while <>] I can think of two ways to interpret that.I mean like [x for x in <A> if <B>], only that it breaks the loop when the expression <B> is false.
How do you plan to modify B during iteration? May be [x for x in itertools.takewhile(<B>, <A>)] when <B> function accept element <A> and return True or False
-- http://mail.python.org/mailman/listinfo/python-list