title: how to release used memory immediately in python list?
body: <p>in many cases ,you are sure you definitely won't use the list again,i hope the memory should be release right now</p>
  
  <pre><code>a = [11,22,34,567,9999]
  del a
  </code></pre>
  
  <p>i'm not sure if it really release the memory,you can use</p>
  
  <pre><code>del a[:]
  </code></pre>
  
  <p>that actually remove all elements in list a .</p>
  
  <p>so the best way to release is this?</p>
  
  <pre><code>def realse_list(a):
     del a[:]
     del a
  </code></pre>
  
  <p>not quite sure.need your opinion.</p>
  
  <p>btw,how about tuple and set?</p>