Discuss / Python / 抄作业交

抄作业交

Topic source

疯羊在田

#1 Created at ... [Delete] [Delete and Lock User]

-- coding: utf-8 --

def triangles(): L = [1] while true: yield L L = L.append(0) L = [L[i-1] + L[i] for i in range(len(L))] for t in triangles(): print(t) n= n + 1 if n == 10: break


  • 1

Reply