L = [1] while True: yield(L) L2 = L.copy() for i in range(1,len(L)): L[i] = L2[i-1]+L2[i] L.append(1)
L2=L.copy()是不是没有这个函数啊? 改成L2=L[:]进行L的复制
Sign in to make a reply
童鞋昵称能改吧