[Ivan Voras] > I need to transform this: > > [1,2,3] > > into this: > > [2,3,1] > > (a left-rotation. Actually, any rotation will do). For Py2.4, use collections.deque.rotate(). For earlier Pythons, concatenate list slices: a[1:] + a[:1] Raymond Hettinger