[x for x in <> while <>]?

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu May 15 03:25:47 EDT 2008


urikaluzhny a écrit :
> It seems that I rather frequently need a list or iterator of the form
> [x for x in <> while <>]
> And there is no one like this.
> May be there is another short way to write it (not as a loop). Is
> there?

The answer is very probably in the itertools module.




More information about the Python-list mailing list