m = 1 L = [] while True: if m == 1: L = [1] yield L elif m == 2: L = [1,1] yield L else: LL = list(range(m)) for x in range(m): if x == 0: LL[x] = 1 elif x == m-1: LL[x] = 1 else: LL[x] = L[x-1] + L[x] L = LL yield LL m = m + 1
Sign in to make a reply
Roger_R36