Iterating over Python list a slice at a time
- by jrdioko
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?