matrix.py

1
2
3
4
5
6
7
class Matrix:
    def __init__(self, contents):
        self.rows = [
            map(int, row.split())
            for row in contents.split('\n')
        ]
        self.columns = map(list, zip(*self.rows))

Comments


You're not logged in right now. Please login via GitHub to comment