class Seq:
values = []
def add(self, value):
Seq.values.append(value)
I did the below in second cell of my Jupyter notebook
model = Seq()
model.add(1)
model.add(2)
model.add(3)
print(model.values)
I got this list printed out which is normal
[1, 2, 3]
But when I run the second cell again, the list keeps growing
[1, 2, 3, 1, 2, 3]
Run it again...
[1, 2, 3, 1, 2, 3, 1, 2, 3]
What am I not doing right?