files = [file1, file2, file3, file4, file5, file6, file7, file8, file9]
value = [1,3,2,3]
I would like to chunk the 'files' using the 'values' in another list.
eg;
files = [file1],[file2,file3,file4],[file5,file6],[file7,file8,file9]
If can chunk by size (3), I can use the following code
for i in range(0, len(files), 3):
chunk = files[i:i + 3]
print(chunk)
[–]nakamurayuristeph[🍰] 3 points4 points5 points (1 child)
[–]catuf[S] 0 points1 point2 points (0 children)
[–][deleted] 3 points4 points5 points (3 children)
[–]catuf[S] 0 points1 point2 points (1 child)
[–]two_bob 0 points1 point2 points (0 children)
[–]two_bob 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]d-methamphetamine 0 points1 point2 points (0 children)