getting n items at a time from a generator

Tim Roberts timr at probo.com
Sat Dec 29 02:18:39 EST 2007


Kugutsumen <kugutsumen at gmail.com> wrote:
>
>I am relatively new the python language and I am afraid to be missing
>some clever construct or built-in way equivalent to my 'chunk'
>generator below.

I have to say that I have found this to be a surprisingly common need as
well.  Would this be an appropriate construct to add to itertools?
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list