Logo
Explore Help
Register Sign In
exercism/python
1
0
Fork 0
You've already forked python
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
c5d9d9c0b3c808c1cb6f1968e7f9a096ec64dfb4
python/exercises/practice/matrix/example.py

12 lines
333 B
Python
Raw Normal View History

remove Python2 class declaration syntax
2019-11-07 08:58:16 -05:00
class Matrix:
python matrix added.
2014-03-18 05:34:18 +01:00
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
matrix: re-implement to conform with canonical data (#1297) * matrix: Rewrite tests to match canonical v1.0.0 * matrix: add necessary methods to stub file * matrix: fix example to pass tests v1.0.0
2018-02-17 04:03:08 +08:00
self.columns = [list(tup) for tup in zip(*self.rows)]
python matrix added.
2014-03-18 05:34:18 +01:00
matrix: re-implement to conform with canonical data (#1297) * matrix: Rewrite tests to match canonical v1.0.0 * matrix: add necessary methods to stub file * matrix: fix example to pass tests v1.0.0
2018-02-17 04:03:08 +08:00
def row(self, index):
Matrix: update tests to 1.1.0 (#1651) Fixes #1645
2019-01-14 10:22:45 -06:00
return self.rows[index - 1]
matrix: re-implement to conform with canonical data (#1297) * matrix: Rewrite tests to match canonical v1.0.0 * matrix: add necessary methods to stub file * matrix: fix example to pass tests v1.0.0
2018-02-17 04:03:08 +08:00
def column(self, index):
Matrix: update tests to 1.1.0 (#1651) Fixes #1645
2019-01-14 10:22:45 -06:00
return self.columns[index - 1]
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 151ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API