title: Python - Ordered List of Dictionaries, With a Size Limit?
body: <p>This is a requirement for a chat application project that I'm creating with Python, Flask, Socketio, and Javascript:</p>
  
  <p>"Messages View: Once a channel is selected, the user should see any messages that have already been sent in that channel, up to a maximum of 100 messages. Your app should only store the 100 most recent messages per channel in server-side memory."</p>
  
  <p>So, what I think I should be doing is creating a list of dictionaries. Like this:</p>
  
  <pre><code>messages = [ {"user":"Dave", "message":"Hello", "time":"12-24-2018"}, {"user":"John", "message":"Test", "time":"12-21-2018"} ]
  </code></pre>
  
  <p>My questions are..</p>
  
  <ol>
  <li>How do I append to/access a list of dictionaries like this?</li>
  <li>How do I limit the size of the list, and replace the oldest element with the second oldest element as I add to it?</li>
  <li>Is this the best practice for storing a fixed size of data server side?</li>
  </ol>