def reset(self):
    if self.memory:
        del self.memory[:]
    self.memory = self.initial_memory.copy()
    if self.inputs:
        del self.inputs[:]
    self.inputs = []
    self.output = None
    self.last_input = None
    self.instruction_ptr = self.START_ADDR
    self.relative_base = self.START_ADDR
def reset(self):
    if self.memory:
        del self.memory[:]
    self.memory = self.initial_memory.copy()
    if self.inputs:
        del self.inputs[:]
    self.inputs = []
    self.output = None
    self.last_input = None
    self.instruction_ptr = self.START_ADDR
    self.relative_base = self.START_ADDR