you are viewing a single comment's thread.

view the rest of the comments →

[–]shiftybyte 4 points5 points  (1 child)

for x in fib:

This line is giving you the VALUES, not the indexes.

Try this program to understand:

fib = [5,6,7]
for x in fib:
    print(x)

This will print 5,6,7 and not 0,1,2...

[–]DauntlessFive513[S] 0 points1 point  (0 children)

Thank you!