(self)
| 230 | return str(self.rows) |
| 231 | |
| 232 | def __str__(self) -> str: |
| 233 | if self.num_rows == 0: |
| 234 | return "[]" |
| 235 | if self.num_rows == 1: |
| 236 | return "[[" + ". ".join(str(self.rows[0])) + "]]" |
| 237 | return ( |
| 238 | "[" |
| 239 | + "\n ".join( |
| 240 | [ |
| 241 | "[" + ". ".join([str(value) for value in row]) + ".]" |
| 242 | for row in self.rows |
| 243 | ] |
| 244 | ) |
| 245 | + "]" |
| 246 | ) |
| 247 | |
| 248 | # MATRIX MANIPULATION |
| 249 | def add_row(self, row: list[int], position: int | None = None) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected