def triangles():
lines = [1]
while True:
yield lines
newLine = [1,1]
for i in range(1,len(lines)):
newLine.insert(i,lines[i-1]+lines[i])
lines=newLine
Sign in to make a reply
鱿鱼
def triangles():
lines = [1]
while True:
yield lines
newLine = [1,1]
for i in range(1,len(lines)):
newLine.insert(i,lines[i-1]+lines[i])
lines=newLine