generate tuples from sequence

Will McGugan will at willmcgugan.com
Wed Jan 17 13:50:33 CET 2007


Will McGugan wrote:

> Hi,
>
> I'd like a generator that takes a sequence and yields tuples containing
> n items of the sqeuence, but ignoring the 'odd' items. For example

Forgot to add, for my purposes I will always have a sequence with a
multiple of n items.


Will




More information about the Python-list mailing list