1-line solution in Clear category for Chunk by U.V
def chunking_by(a, size): return [a[i: i + size] for i in range(0, len(a), size)]
June 25, 2023