def triangles(): L2=[1] empty=[1] while True: i=0 while i+1<len(L2): temp=L2[i]+L2[i+1] empty.append(temp) i=i+1 empty.append(1) L2=empty empty=[1] yield L2
Sign in to make a reply
taogebuaa