Is there a nice Pythonic way to loop over a list, retuning a pair of elements? The last element should be paired with the first.
So for instance, if I have the list
L = [1, 2, 3] a = zip(L, L[1:]+L[:1]) for i in a: b = list(i) print b