






















TIL how to create fixed-length iterables in Python using collections.deque with maxlen parameter. Perfect for creating circular buffers and bounded collections.
January 24, 2022 · 1 min · 66 words
If you want to create an iterable of a fixed length in python, use
collections.deque with the maxlen parameter.
| |
Note that this merely calls appendleft.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。