Discuss / Python / 作业

作业

Topic source

MeanCoder

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

  • 1

Reply