Python: How to Completely delete Linked List?
<p>Lets say that I have such class definition for <code>Node</code></p>

<pre><code>class Node:
    def __init__(self, data, next):
        self.data = data
        self.next = next
</code></pre>

<p>Also I have <code>head</code> variable which points to the beginning of linked list. </p>

<p>Is it enough to set <code>head = None</code> to completely delete linked list? I suppose gc should do it's work? </p>

<p>I compare it to <code>c/c++</code> where you should still iterate over whole list and free every element.</p>