def triangles(): L = [1] while True: yield L L=[1]+[L[i]+L[i-1] for i in range(1,len(L))]+[1]
Sign in to make a reply
提米冰冰