Discuss / Python / 诶嘿

诶嘿

Topic source

惊蛰-清明

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

def triangles():

    c = [1]

    while True:

        print(c)

        yield c

        c = [x+c[i+1] for i,x in enumerate(c) if len(c)>i+1]

        c.append(1)

        c.insert(0,1)


  • 1

Reply