Discuss / Python / 杨辉三角。。。

杨辉三角。。。

Topic source

a = [1] yield a b = [1, 1] while True: yield b c = [b[i] + b[i+1] for i in range(len(b) - 1)] b = a + c b = b + a


  • 1

Reply