Rotating lists?

Paul Rubin http
Thu Sep 16 02:07:40 CEST 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