def __eq__(self, other):
    if not isinstance(other, Card):
        return NotImplemented
return self.rank == other.rank and self.suit == other.suit
Unable to remove objects from a list in another object