def triangles():
L=[1]
while True:
yield L[:]
L.append(0)
L=[L[n]+L[n-1] for n in range(len(L))]
Sign in to make a reply
海淀非典型帅哥
def triangles():
L=[1]
while True:
yield L[:]
L.append(0)
L=[L[n]+L[n-1] for n in range(len(L))]