CMDs = ["prt", "prtr", "prtm"] def prt(self, operand): print(operand[0]) def prtr(self, operand): if len(operand) > 0: print(self.registers[int(operand[0])], end="") else: print(self.registers, end="") def prtm(self, operand): if len(operand) > 0: print(self.dtMemory[int(operand[0])], end="") else: print(self.dtMemory, end="")