title: How to force a list to a fixed size?
body: <p>In Python 3, I want to create a list that will contain the last 5 variables entered into it.</p>
  <p>Here is an example:</p>
  <pre><code>&gt;&gt;&gt;l = []
  &gt;&gt;&gt;l.append('apple')
  &gt;&gt;&gt;l.append('orange')
  &gt;&gt;&gt;l.append('grape')
  &gt;&gt;&gt;l.append('banana')
  &gt;&gt;&gt;l.append('mango')
  &gt;&gt;&gt;print(l)
  ['apple','orange','grape','banana','mango']
  &gt;&gt;&gt;l.append('kiwi')
  &gt;&gt;&gt;print(l)
  ['orange','grape','banana','mango','kiwi'] #only 5 items in list
  </code></pre>
  <p>So, in python, is there any way to achieve what is demonstrated above? The variable does not need to be a list, I just used it as an example.</p>