def triangles(): r = [1] while True: yield r a = [0] + r b = r + [0] r = [x + y for x, y in zip(a, b)]
Sign in to make a reply
遥望君山