aboutsummaryrefslogtreecommitdiff
path: root/challenge-108/laurent-rosenfeld/python/ch-2.py
blob: 7ba144da96cc3997f1d2d5b3922abc3a6d71a61e (plain)
1
2
3
4
5
6
7
8
9
max = 10
tr = [[0] * max for i in range(max)]
tr[0][0] = 1
for row in range(1, max):
    tr[row][0] = tr[row - 1][row - 1]
    for i in range(1, row+1):
        tr[row][i] = tr[row][i-1] + tr[row - 1][i-1];

print( [row[0] for row in tr] )