There's a little thing to note here in this problem.
When you pass in the name and append it to the existing shared tricks
list, it is, as you saw, shared by all the values, because it is that list.
However, when you do self.tricks=[name]
in your second example, you are erasing that objects instance of self.tricks
and are replacing it with the list [name]
This is similar to having a parent and child class; when the child class doesn't give a different definition for an existing function, calling it calls the parent's function. But if you do, it calls the child's function.