def triangles():
L = [1]
while True:
yield L
n = 0
X = [1,1]
while n<len(L)-1:
s = L[n] + L[n+1]
X.insert(1,s)
n+=1
L = X
Sign in to make a reply
不一样的小肚子
def triangles():
L = [1]
while True:
yield L
n = 0
X = [1,1]
while n<len(L)-1:
s = L[n] + L[n+1]
X.insert(1,s)
n+=1
L = X