Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #from sys import stdin
- class Matrix:
- def __init__(self, lines):
- self.lines = []
- for line in lines:
- lines.append(line.copy())
- def __str__(self):
- s = '\n'.join(map(lambda line: '\t'.join(map(str, line)), self.lines))
- return s
- m1 = Matrix([[1, 0, 0], [1, 1, 1], [0, 0, 0]])
- m2 = Matrix([[1, 0, 0], [1, 1, 1], [0, 0, 0]])
- print(str(m1) == str(m2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement