Iterating over Python list a slice at a time
Posted
by jrdioko
on Stack Overflow
See other posts from Stack Overflow
or by jrdioko
Published on 2010-04-19T23:20:15Z
Indexed on
2010/04/19
23:23 UTC
Read the original article
Hit count: 342
I'd like to iterate over a list in Python several (say, 10) elements at a time, processing each slice one by one. I can think of a few ways to do this, but none seems obvious and clean. What is the most Pythonic way to do this?
© Stack Overflow or respective owner