title: Reallocating list in python
body: <p>Ok this is my problem. I am trying something like this:</p>
  
  <pre><code>for i in big_list:
     del glist[:]
  
     for j in range(0:val)
           glist.append(blah[j])
  </code></pre>
  
  <p>The idea is to reset the list and reuse it for the next set of data points.
  The problem is, for some reason, if the first list has 3 points,</p>
  
  <pre><code>glist[0]
  glist[1]
  glist[2]
  </code></pre>
  
  <p>The next list will continue from index 3 and store the last 3 elements in those indexes</p>
  
  <pre><code>glist[0] = 4th elem of new list
  glist[1] = 5th elem of new list
  glist[2] = 6th elem of new list
  glist[3] = 1st elem of new list
  glist[4] = 2nd elem of new list
  glist[5] = 3rd elem of new list
  </code></pre>
  
  <p>I'm sure it is an issue with allocated space. But how can I achieve this del g_list[:] so the result is,</p>
  
  <pre><code>glist[0] = 1st elem of new list
  glist[1] = 2nd elem of new list
  glist[2] = 3rd elem of new list
  glist[3] = 4th elem of new list
  glist[4] = 5th elem of new list
  glist[5] = 6th elem of new list
  </code></pre>
  
  <p>Allocating variable from within loop is not an option.  Any ideas?</p>