[Solved] Display a List with order modulo N in Python


>>> l = [1,2,3,4,5,6]
>>> N = len(l)
>>> revL = l[::-1]
>>> revL
[6, 5, 4, 3, 2, 1]
>>> for i in range(1,N):
...     print revL[-i:] + revL[:(N-i)]
...     
[1, 6, 5, 4, 3, 2]
[2, 1, 6, 5, 4, 3]
[3, 2, 1, 6, 5, 4]
[4, 3, 2, 1, 6, 5]
[5, 4, 3, 2, 1, 6]

1

solved Display a List with order modulo N in Python