Classes in Python can have their member variables instantiated within the __init__ function, which is called upon creation of the class object. You should read up on classes here if you are unfamiliar with how to create one. Here is an example class that instantiates a list as a member and allows appending to the list:
class ListContainer:
def __init__(self):
self.internal_list = [] # list member variable, unique to each instantiated class
def append(elem):
self.internal_list.append(elem)
def getList():
return self.internal_list
list_container_1 = ListContainer()
list_container_1.append('example')
print list_container_1.getList() # prints ['example']
list_container_2 = ListContainer()
print list_container_2.getList() # prints []
self.my_list = []ormy_list = lsit()in your__init__()method?self.my_list = list()of course. I obviously failed my proof reading. ;-)