I'm inheriting from the python list class but I can't seem to figure out how to modify the list itself like below:
class MyList(list):
def __init__(self):
super().__init__()
self = [0, 0, 0, 0]
a = MyList()
print(a) # [] instead of [0, 0, 0, 0]
__str__?listis a little bit tricky. Maybe you could subclasscollections.UserListinstead?self.extend([0, 0, 0, 0])in the init