Removing different instances in a list
<p>Hi guys!</p>

<p>I have a small problem, i can't verbally explain the problem, so i'll just try to illustrate it in code:</p>

<pre><code>class move(object):
    def __init__(self, number):
        self.number = number

list1 = [move(1), move(2), move(3), move(4)]
list2 = [move(3), move(7)]

list1.remove(list2[0])

Traceback (most recent call last):
  File "&lt;pyshell#6&gt;", line 1, in &lt;module&gt;
    list1.remove(list2[0])
ValueError: list.remove(x): x not in list
</code></pre>

<p>As you can see, list1[2] and list2[0] are both derived from the same class and have the exact same attributes, they are only two different instances of this class</p>

<p>What is the optimal solution to this problem?</p>

<p>Thank you very much for your help!</p>
