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.139 tracks/python/exercises/matrix/example.py
trackler-2.2.1.138 tracks/python/exercises/matrix/example.py
trackler-2.2.1.137 tracks/python/exercises/matrix/example.py
trackler-2.2.1.136 tracks/python/exercises/matrix/example.py
trackler-2.2.1.135 tracks/python/exercises/matrix/example.py
trackler-2.2.1.134 tracks/python/exercises/matrix/example.py
trackler-2.2.1.133 tracks/python/exercises/matrix/example.py
trackler-2.2.1.132 tracks/python/exercises/matrix/example.py
trackler-2.2.1.131 tracks/python/exercises/matrix/example.py
trackler-2.2.1.130 tracks/python/exercises/matrix/example.py
trackler-2.2.1.129 tracks/python/exercises/matrix/example.py
trackler-2.2.1.128 tracks/python/exercises/matrix/example.py
trackler-2.2.1.127 tracks/python/exercises/matrix/example.py
trackler-2.2.1.126 tracks/python/exercises/matrix/example.py
trackler-2.2.1.125 tracks/python/exercises/matrix/example.py
trackler-2.2.1.124 tracks/python/exercises/matrix/example.py
trackler-2.2.1.123 tracks/python/exercises/matrix/example.py
trackler-2.2.1.122 tracks/python/exercises/matrix/example.py
trackler-2.2.1.121 tracks/python/exercises/matrix/example.py
trackler-2.2.1.120 tracks/python/exercises/matrix/example.py