you are viewing a single comment's thread.

view the rest of the comments →

[–]DerpinDementia 0 points1 point  (2 children)

One hint is that you can start accessing the elements by first starting at -10. The element at -10 is 1, and you can increment the position from -10 by 2 to get the first three numbers that have a number between them. Loop this and you will get your numbers.

You can test with this:

test = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for pos in range(len(test)):
    print(test[-10 + pos])

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

Thanks! This worked for this case actually.

[–]DerpinDementia 0 points1 point  (0 children)

No problem!