title: How to remove the last element of the array and free that part of the memory?
body: <p>For example, If I have an list - </p>
  
  <pre><code>a = [10,2,3,5,17]
  </code></pre>
  
  <p>I want to tell python that I don't want the element 17 anymore and I want to remove that element and decrease the size of the array by 1. </p>
  
  <p>I know python automatically frees all objects that are not referenced anymore, but how do I tell python that I don't want to use the last index anymore? </p>
  
  <p>I basically want to make my program more memory efficient and remove all the extra space that I don't want dynamically.</p>