John Roberts - 8 months ago 74

Python Question

It should look like 1,1,2,3,5 but i can't find out how to do print like this, i've tried with .join but it's not working.

`fib_b = int(input("Fibonacci number? "))`

def fib():

if n<=1:

return 1

else:

return fib(n-1) + fib(n-2)

fibs= [fib(i) for i in range(fib_n)]

**print (fibs)**

Answer

What you are looking for seems similar to this. Please check if this answers your query.

Source (Stackoverflow)