title: what is best way to for loop with large list(about use memory) in python2.6
body: <p>this is my memory profile results.</p>
  
  <pre><code>Line #    Mem usage    Increment   Line Contents
  ================================================
      88 1671.008 MiB    0.012 MiB           self.list_new_log = some_function()
      91 3769.992 MiB 2098.984 MiB           for i in self.list_new_log:
      92 3769.992 MiB    0.000 MiB               ...
                                                 ...
                                                 ...
     109   15.730 MiB -3754.262 MiB           release_memory(self.list_new_log)
  </code></pre>
  
  <p><strong>self.list_new_log</strong> is splitlines() some file. (huge size list)</p>
  
  <p>My problem is in line 91.</p>
  
  <p>The for loop uses a lot of memory.</p>
  
  <p>I have thought of a way to divide a huge list into several, but it does not seem to be a good way. What should I do?</p>