'how to properly delete the memory occupied by an object in python?

enter image description here

As you can see in the image, a list retains the value even after del keyword has been used. Yes I have read the official doc on del statement

Deletion of a name removes the binding of that name from the local or global namespace

But if del statement only removed of the name binding and does not actually free the memory space then what is the use of such a statement? and how do you truly free a memory occupied by an object?

most importantly if an object assigned to list does not disappear in list after we delete it then why does 2 list assiged as list1 = list2 will delete their elements simultaneously when we perform del list1[i] on one of them.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source