Fate of itertools.dropwhile() and itertools.takewhile()

Istvan Albert istvan.albert at gmail.com
Sun Dec 30 09:12:35 EST 2007


On Dec 30, 3:29 am, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:

> One "recipe" is extracting blocks from text files that are delimited by a
> special start and end line.

Neat solution!

I actually need such functionality every once in a while.

Takewhile + dropwhile to the rescue!

i.



More information about the Python-list mailing list