作业
Topic source我和你的差不太多:
def triangles():
L=[1]
while True:
yield L
L = [1]+[L[i] + L[i+1] for i in range(len(L)-1)]+[1]
其实没有必要单独定义第二行的,在输出第二行时那个for循环零次。
- 1
我和你的差不太多:
def triangles():
L=[1]
while True:
yield L
L = [1]+[L[i] + L[i+1] for i in range(len(L)-1)]+[1]
其实没有必要单独定义第二行的,在输出第二行时那个for循环零次。
桑桑喵喵i