Simplified the __str__ method.
This commit is contained in:
parent
0a956e8500
commit
9118bb16a9
|
@ -6,7 +6,7 @@ class BasicRegister:
|
|||
self.memory: list[bool] = memory
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"Memory: [{', '.join([str(int(value)) for value in self.memory])}]"
|
||||
return f"Memory: {[int(value) for value in self.memory]}"
|
||||
|
||||
def reverse(self):
|
||||
self.memory = [not value for value in self.memory]
|
||||
|
|
Loading…
Reference in New Issue