I'm just started learning python.. How to return list? Is here any error in code.?
def fibonocci(x,i):
if len(lst)>=x:
return lst
v=lst[i-1]+lst[i-2]
lst.append(v)
fibonocci(x,i+1)
n=int(input("Enter a number: "))
lst=[0,1]
print(fibonocci(n,2))