def triangles(): L=[1] while True: yield L L=[1]+[L[x]+L[x+1] for x in range(len(L)-1)]+[1]
Sign in to make a reply
qiuyuejs