def triangles(): l = [1]; while True: yield l l2 = l[:] l = [x + y for x, y in zip(l + [0], [0] + l2)]
Sign in to make a reply
Lance6716