What does deque(maxlen=3) do when a fourth item is appended in Python?
Correct answer
D. Discards the item from the opposite end
6 views
D. Discards the item from the opposite end
6 views
A bounded deque drops items from the other end when full.
Asked in: Python Interview Advanced
https://docs.python.org/3/library/index.htmlNot sure why the answer is D? Ask here and get an explanation.