I know this maybe easy but I need help with creating a fibonacci sequence array from a to b.
This is my code so far:
list = 
if a == 0:
elif a == 1:
return FibL(a-1) + (a-2)
for i in range(a, b+1):
When I test it with print(FibL(1,6)), it returns 1.
I need it to return [1, 1, 2, 3, 5, 8]
No mystery here. When it sees that a == 1, it returns immediately with a value of 1. It won't get to the list.append code.
Oh my goodness, you are mixing a recursive fibonacci number function with an attempt to make a sliced list. A recipe for disaster.
You can get a selected list of Fibonacci numbers this way: http://www.daniweb.com/software-development/python/threads/20774/starting-python/18#post1910427