Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import collections
- d = collections.deque(xrange(10))
- print 'Normal :', d
- d = collections.deque(xrange(10))
- d.rotate(2)
- print 'Right rotation:', d
- d = collections.deque(xrange(10))
- d.rotate(-2)
- print 'Left rotation :', d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement