I want to print the whole list up to the element that is given by function,
such as [1,1,2,3,5,8]
def Fib(a):
b=[ ]
if a==0:
b.append(1)
elif a==1:
b.append(1)
else:
b.append(Fib(a-1)+Fib(a-2))
print(b)
Fib(6)
I get the error of "unsupported operand type(s) for +: 'NoneType' and 'NoneType'" Thanks in advance, all the helps are appreciated.