list splicing [1:-1 code example
Example 1: slicing in python list
a = [1,2,3,4,5]
a[m:n] # elements grrater than equal to m and less than n
a[1:3] = [2,3]
Example 2: is : and :: the same in python slice
a[-1] # last item in the array
a[-2:] # last two items in the array
a[:-2] # everything except the last two items