I have a class of objects :
class Object :
def __init__(self,id,x,y):
self.id = id
self.x = x
self.y = y
The id of the object is unique but for x and y they might be similar :
For example let's have 4 objects :
ob1 = Object(0, 2.7, 7.3)
ob2 = Object(1, 2.7, 7.3)
ob3 = Object(2, 3.2, 4.6)
ob4 = Object(3, 2.7, 7.3)
I would like to keep only objects that have x and y different, for example here I would like to keep only ob1 and ob3 or ob2 and ob3 or ob4 and ob3.
How could I do it?
Thanks