L[x::y] means the slice L , where x is the index to start with y is the step size. Here are some examples you can try in the interpreter.
>>> L=range(20) >>> L [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
If you want every third item
>>> L[::3] [0, 3, 6, 9, 12, 15, 18]
Now every third element, starting with L [1]
>>> L[1::3] [1, 4, 7, 10, 13, 16, 19]
Now every third element, starting with L [2]
>>> L[2::3] [2, 5, 8, 11, 14, 17]
You can specify a negative step to go back
>>> L[::-1] [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
You can also assign this slice, but the value should be the same length as the slice you replace
>>> L[::3]=[0,0,0,0,0,0,0] >>> L [0, 1, 2, 0, 4, 5, 0, 7, 8, 0, 10, 11, 0, 13, 14, 0, 16, 17, 0, 19]
Finally, you can remove every third item like this
>>> del L[::3] >>> L [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19]