yield [1] L1=[1] while True: L2=[x for x in L1] L2.append(0) for i in range(len(L2)): if i==0 or i==len(L2)-1: L2[i]=1 else: L2[i]=L1[i-1]+L1[i] L1=L2 yield L2
Sign in to make a reply
FengBNU