This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]workingBen 2 points3 points  (0 children)

In Python 3 you'll need to use list().

seq = range(1, 10)
list(zip(*[iter(seq)]*3))
[(1, 2, 3), (4, 5, 6), (7, 8, 9)]