list = [1] r = 1 while True: yield list i = 1 temp = [1] while i < r: temp.append(list[i-1] + list[i]) i = i + 1 list = temp list.append(1) r = r + 1 return 'done'
L = [1] while True: yield L L = [0] + L + [0] L = [L[i] + L[i + 1] for i in range(len(L) - 1)]
Sign in to make a reply
沙耶子Ver3