index slicing in python 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: python array slice
>>> a[1:4]
[2, 3, 4]
a = [1,2,3,4,5]
a[m:n] # elements grrater than equal to m and less than n
a[1:3] = [2,3]
>>> a[1:4]
[2, 3, 4]