I came across your article about n-wise iteration which looks helpful. I tried to run it in Python 2.7 but am getting a ValueError: too many values to unpack error on the print first, second, third line. Also, I'd prefer a result that gives an additional two lists
So
for first, second, third in n_wise([0, 1, 2, 3, 4, 5, 6], 3):
print first, second, third
I came across your article about n-wise iteration which looks helpful. I tried to run it in Python 2.7 but am getting a
ValueError: too many values to unpack
error on theprint first, second, third
line. Also, I'd prefer a result that gives an additional two listsSo
would render: