The difference is that in your second example you are creating a new list, self.tricks, as an attribute of the object:
def __init__(self,name):
self.name=name
self.tricks=[name] # <-- this is creating the new attribute for the object
self.tricks.append(name)
The first example works because of Python's way of resolving the names: If self.tricks cannot be found in the object (because it hasn't been created), then it tries to find it as a member of the class. Since tricks is there, then you can access it.
It may become clear to you if you try to use mytest.tricks in your second example:
def __init__(self,name):
self.name=name
mytest.tricks=[name] # <-- this is accesing the class attribute instead
self.tricks.append(name)
That will output what you are actually expecting.