How can I add method, which allowed to use in
With my class aa?
class aa:
def __init__(self,x):
self.x=x
def __str__(self):
return str(self.x)
def __add__(self,other):
x=self.x+other
return aa(x)
a=aa(2)
print(2 in a) # error: “...arg not iterable”