Sha256: e441ac6d63672ea9d736e1b1f103044d5b0ab0631aeaee966cfee81728e17858

Contents?: true

Size: 333 Bytes

Versions: 73

Compression:

Stored size: 333 Bytes

Contents

class Matrix(object):
    def __init__(self, s):
        self.rows = [[int(n) for n in row.split()]
                     for row in s.split('\n')]
        self.columns = [list(tup) for tup in zip(*self.rows)]

    def row(self, index):
        return self.rows[index]

    def column(self, index):
        return self.columns[index]

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/python/exercises/matrix/example.py
trackler-2.2.1.179 tracks/python/exercises/matrix/example.py
trackler-2.2.1.178 tracks/python/exercises/matrix/example.py
trackler-2.2.1.177 tracks/python/exercises/matrix/example.py
trackler-2.2.1.176 tracks/python/exercises/matrix/example.py
trackler-2.2.1.175 tracks/python/exercises/matrix/example.py
trackler-2.2.1.174 tracks/python/exercises/matrix/example.py
trackler-2.2.1.173 tracks/python/exercises/matrix/example.py
trackler-2.2.1.172 tracks/python/exercises/matrix/example.py
trackler-2.2.1.171 tracks/python/exercises/matrix/example.py
trackler-2.2.1.170 tracks/python/exercises/matrix/example.py
trackler-2.2.1.169 tracks/python/exercises/matrix/example.py
trackler-2.2.1.167 tracks/python/exercises/matrix/example.py
trackler-2.2.1.166 tracks/python/exercises/matrix/example.py
trackler-2.2.1.165 tracks/python/exercises/matrix/example.py
trackler-2.2.1.164 tracks/python/exercises/matrix/example.py
trackler-2.2.1.163 tracks/python/exercises/matrix/example.py
trackler-2.2.1.162 tracks/python/exercises/matrix/example.py
trackler-2.2.1.161 tracks/python/exercises/matrix/example.py
trackler-2.2.1.160 tracks/python/exercises/matrix/example.py