#题目:打印出杨辉三角形(要求打印出10行如下图)。
#!/usr/bin/python3
def Pascal(n):
ls = [[1]]
for i in range (1, n):
ls.append([1])
for j in range(1, i):
ls[i].append(ls[i-1][j-1] + ls[i-1][j])
ls[i].append(1)
for i in range(0, n): print(ls[i])
return ls
a = Pascal(10)