On Wed, 08 Apr 2009 10:51:19 -0400 Neal Becker <ndbeck...@gmail.com> wrote:
> What was wrong with this one? > > def demux(iterable, n): > return tuple(islice(it, i, None, n) for (i, it) in > enumerate(tee(iterable, n))) Nothing much, I only noticed after posting that this one handles infinite sequences too. For smallish values of n it is acceptable. P. -- http://mail.python.org/mailman/listinfo/python-list