Python: Best way to place data in a list and as time progresses update and delete oldest value
<p>essentially I have a stream of data coming in from this code that updates every minute with the newest prices:</p>

<pre><code>prices = data.history(context.stocks, "close", 15600, "1m")
</code></pre>

<p>I'm looking to get this historical data put into some sort of list when every minute this code feeds the newest price into it and the oldest, in this case being the 15600th minute being deleted.</p>

<p>How would I go about doing this? use a window somehow? or just a code to add newest value to a list and delete oldest.</p>

<p>I appreciate any help,</p>

<p>Thanks
Mike</p>