diff options
Diffstat (limited to '')
-rw-r--r-- | polymatrix/polymatrix/impl.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/polymatrix/polymatrix/impl.py b/polymatrix/polymatrix/impl.py index ac426b7..55c9e0e 100644 --- a/polymatrix/polymatrix/impl.py +++ b/polymatrix/polymatrix/impl.py @@ -27,12 +27,12 @@ class PolyMatrixImpl(PolyMatrix): rows.append("0") columns.append(tuple(row.rjust(row_width) for row in rows)) - string = "" + row_strings = [] for r in range(nrows): column = ", ".join(columns[c][r] for c in range(ncols)) - string += f"[ {column} ]\n" + row_strings.append(f"[ {column} ]") - return string + return "\n".join(row_strings) @dataclassabc(frozen=True) |