<commit_before>class Matrix:

    def __init__(self, matrix_string):
        rows = matrix_string.split("\n")
        self._row_size = len(rows)
        self._matrix = [[int(cell) for cell in row.split()] for row in rows]

    def row(self, index):
        internal_index = index - 1
        return list(self._matrix[internal_index])

    def column(self, index):
        internal_index = index - 1
        return [self._matrix[i][internal_index] for i in range(self._row_size)]
<commit_msg>A third solution to the exercise Matrix from Exercism in the Python Track.<commit_after>class Matrix:

    def __init__(self, matrix_string):
        rows = matrix_string.splitlines()
        self._matrix = [[int(cell) for cell in row.split()] for row in rows]

    def row(self, index):
        internal_index = index - 1
        return self._matrix[internal_index]

    def column(self, index):
        internal_index = index - 1
        return [row[internal_index] for row in self._matrix]

{'fraction_non_alphanumeric': 0.10264227642276423, 'fraction_numerical': 0.0040650406504065045, 'mean_word_length': 2.877952755905512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2953928', 'n_tokens_mistral': 292, 'n_tokens_neox': 283, 'n_words': 88}