1def chunks(lst, n):
2 """Yield successive n-sized chunks from lst."""
3 for i in range(0, len(lst), n):
4 yield lst[i:i + n]
5
6list(chunks(range(10, 75), 10))
1def chunks(lst, n):
2 """Yield successive n-sized chunks from lst."""
3 for i in range(0, len(lst), n):
4 yield lst[i:i + n]
5