Python Datatype for a fixed-length FIFO
<p>I would like to know if there is a native datatype in Python that acts like a fixed-length FIFO buffer.  For example, I want do create a length-5 FIFO buffer that is initialized with all zeros.  Then, it might look like this:</p>

<p>[0,0,0,0,0]</p>

<p>Then, when I call the put function on the object, it will shift off the last zero and put the new value, say 1, into the left side:</p>

<p>[1,0,0,0,0]</p>

<p>If I put a 2, it would then shift and put to look like this:</p>

<p>[2,1,0,0,0]</p>

<p>...and so on.  The new value goes at the front and the oldest one is shifted off.  I understand that this would be very easy to implement myself, but I would like to use native python datatypes if at all possible.  Does anyone know which datatype would be best for this?</p>
