Discuss / Python / 交个作业(^ - ^)

交个作业(^ - ^)

Topic source

土城剑客

#1 Created at ... [Delete] [Delete and Lock User]
  b =[1]
    while(True):
        yield b
        n=len(b)
        a=b.copy()
        for i in range(1,n):
            b[i]=a[i-1]+a[i]
        b.append(1)
    return "end"

  • 1

Reply