Discuss / Python / 觉得自己好蠢

觉得自己好蠢

Topic source

Lance6716

#1 Created at ... [Delete] [Delete and Lock User]
def triangles():
    l = [1];
    while True:
        yield l
        l2 = l[:]
        l = [x + y for x, y in zip(l + [0], [0] + l2)]

  • 1

Reply