Rotating lists?

Paul Rubin http
Wed Sep 15 20:07:40 EDT 2004


Ivan Voras <ivoras at __-geri.cc.fer.hr> writes:

> I tried:
> 
> a = a[1:] + a[0]
> 
> which doesn't work because there's no __add__ between a list and
> integer, and:

You meant to say

  a = a[1:] + [a[0]]



More information about the Python-list mailing list