The problem is easy, I want to iterate over each element of the list and the next one in pairs (wrapping the last one with the first).
I\'ve thought about two unpyth
Even shorter version of Fortran's zip * range solution (with lambda this time;):
group = lambda t, n: zip(*[t[i::n] for i in range(n)]) group([1, 2, 3, 3], 2)
gives:
[(1, 2), (3, 4)]