Working With Python's deque Quiz
Interactive Quiz ⋅ 8 Questions
By Joseph Peart
In this quiz, you’ll test your understanding of Working With Python’s deque.
By working through this quiz, you’ll revisit how a deque stores its items in a doubly
linked list, why appends and pops at both ends are fast, and when a list is still the
better choice.
You’ll also check your grasp of building queues with .append() and .popleft(), and of
using maxlen to keep a bounded history of recent items.
The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
Working With Python's deque
Learn how to use Python's deque to efficiently append and pop items from both ends, build queues and stacks, and set maxlen for bounded history.