Recall that we can create lists using range as follows:
list(range(5, 10, 2))
The values of list(range(5, 10, 2)) is a list ranging from 5 to 10 (not including anything $\geq 10$, increasing in steps of 2.
Here is how we can access lists in a similar way. What follows is usually called "slicing".
L[m:n:k] means "get the entries of L, starting with index m and up (if $k\geq 0$)/down (if $k<0$) to but not including index n, with steps of k".
L = [9, 8, 7, 6, 5, 4, 3, 10, 15, 17, 18]
L[1:8:2]
L[9:3:-1]
It is possible to omit the step size. The default is 1:
L[1:8]
It's also possible to omit the start and end points. They are determined according to the sign of the step size:
L[5::1]
L[5:] #omit end point and step size
L[5::-1] #end point is the beginning since the step size is negative
One common thing that people do is obtain a copy of the list in reverse by only specifying that the step size is -1. That makes the starting point the very end of the list, and the end point the very beginning:
L
L[::-1]