mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
14 lines
280 B
Python
14 lines
280 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
# author: bt3gl
|
|
|
|
|
|
def get_row(self, row: int) -> list[int]:
|
|
|
|
if row == 0:
|
|
return [1]
|
|
|
|
result = self.get_row(row - 1)
|
|
|
|
return [1] + [sum(_) for _ in zip(result, result[1:])] + [1]
|