I wrote a Python program that acts on a large input file to create a few million objects representing triangles. The algorithm is:
You can't explicitly free memory. What you need to do is to make sure you don't keep references to objects. They will then be garbage collected, freeing the memory.
In your case, when you need large lists, you typically need to reorganize the code, typically using generators/iterators instead. That way you don't need to have the large lists in memory at all.
http://www.prasannatech.net/2009/07/introduction-python-generators.html