def triangles(): L = [1] while True: yield L L = L + [0] L = [L[i] + L[i - 1] for i in range(len(L))]
Sign in to make a reply
做回自己ZXH