Chunking sequential values in a list

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Jul 14 08:42:16 EDT 2006


Peter Otten:
> which is almost identical to the last example in
> http://docs.python.org/lib/itertools-example.html

I see, thank you. I haven't had enoug time and brain to fix it (and the
OP question seemed like homework, so leaving some other things to do is
positive).

I think still that too much clever code can be bad, it isn't easy to
understand, fix and modify if you need something a little different.
To solve such problem in 'production code' I probably prefer a longer
function like the one I have shown.

Bye,
bearophile




More information about the Python-list mailing list