Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import collections
- d = collections.deque('abcdefg')
- print 'Deque:', d
- print 'Length:', len(d)
- print 'Left end:', d[0]
- print 'Right end:', d[-1]
- d.remove('c')
- print 'remove(c):', d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement