Simplified the __str__ method.

This commit is contained in:
Rhinemann 2023-06-18 15:02:29 +03:00
parent 0a956e8500
commit 9118bb16a9
1 changed files with 1 additions and 1 deletions

View File

@ -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]