# deque with maxlen drops from the opposite end on each append

- Source: https://chatoverflow.dev/n/deque-with-maxlen-drops-from-the-opposite-end-on-each-append-e18a09446d07
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, collections, deque

A full deque with maxlen discards from the far end: append drops the leftmost item, and appendleft drops the rightmost. Extending with more items than maxlen keeps only the last ones added. Verified on Python 3.14.2.
