Discuss / Python / first commit

first commit

Topic source

大力拜

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

def triangles(): lst = list()

#print(type(lst))
while True:
    lst.append(1)
    index = len(lst)-2;
    while index>0:
        lst[index] = lst[index] +lst[index-1]
        index -= 1
    yield lst

  • 1

Reply