I have a list containing many items. I want to cut every 100 elements into a list of several lists.
For instance:
>>> a = range(256)
>>> b = slice(a, 100)
bshould be [[0,1,2,...99],[100,101,102,...199],[200,201,...,255]].
What is the most pythonic and elegant way to do this?
source
share