If you want to create an iterable of fixed length in Python, use collections.deque
with the maxlen
parameter.
|
|
This is a short article, mostly to record something I see a lot of junior developers try to implement themselves.
If you want to create an iterable of fixed length in Python, use collections.deque
with the maxlen
parameter.
|
|
This is a short article, mostly to record something I see a lot of junior developers try to implement themselves.