def triangles(): l=[1] yield l while True: ll=[]
#遍历计算出L 加入到新的ll a=0 b=0 for temp in l: b=temp ll.append(a+b) a=b ll.append(1) l=ll yield l
Sign in to make a reply
超级lion
def triangles(): l=[1] yield l while True: ll=[]