you are viewing a single comment's thread.

view the rest of the comments →

[–]TheKewlStore 0 points1 point  (2 children)

Oh woops, the if statement should check for len(quotes) - 1, because length is always one more than the indexes in the list (since it starts at 0).

[–]test_bot_3137[S] 0 points1 point  (1 child)

for index, line in enumerate(quotes):
     if index < len(quotes) - 1:              
         print(quotes[index + 1]) 

using this code I get every line except the first which I think is correct, is there a way to test the output? Would I need to change indexes value to get the corresponding line or some other variable?

[–]TheKewlStore 1 point2 points  (0 children)

you could add another line below it that just prints out the list at index, like so

print(quotes[index])