Advertisement
here2share

# deque.py

Sep 8th, 2024
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. # deque.py
  2.  
  3. from collections import deque
  4.  
  5. my_deque = deque(maxlen=2)
  6. my_deque.append(1)
  7. my_deque.append(2)
  8. my_deque.append(3)
  9. print(list(my_deque))  # Output: [2, 3]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement