4 lines
95 B
Python
4 lines
95 B
Python
def chunk_list(lst, n) -> list:
|
|
for i in range(0, len(lst), n):
|
|
yield lst[i:i + n]
|