Split a Python list into sublists
seq = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
num = 3

[seq[i::num] for i in range(num)]

The result is

[[1, 4, 7, 10], [2, 5, 8], [3, 6, 9]]

CategoryComputing.Lang.Python