Re: [Tutor] cyclically rotate a seq

2005-03-17 Thread Kent Johnson
kevin parks wrote: Hi folks, I am trying to cyclically rotate a seq until it reached the beginning stage again. I would like to be able BTW collections.deque supports most list methods and rotate(): http://docs.python.org/lib/module-collections.html Kent __

Re: [Tutor] cyclically rotate a seq

2005-03-11 Thread Kent Johnson
kevin parks wrote: Hi folks, I am trying to cyclically rotate a seq until it reached the beginning stage again. I would like to be able to rotate in both directions and using any arbitrary interval. I think the code is correct but I have a few suggestions below. #!/usr/bin/env python import sys i

[Tutor] cyclically rotate a seq

2005-03-10 Thread kevin parks
Hi folks, I am trying to cyclically rotate a seq until it reached the beginning stage again. I would like to be able to rotate in both directions and using any arbitrary interval. I think that I have this correct, but would be happy for someone to check it and also i am interested in any improve