Discuss / Python / 交个做作业

交个做作业

Topic source

June

#1 Created at ... [Delete] [Delete and Lock User]
def triangles():
    L = [0,1,0]
    while True:
        yield L[1:-1]
        L = [0] + [L[x]+L[x+1] for x in range(len(L)-1)] + [0]

Karmotrine

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

👍👍👍


  • 1

Reply