Slicing refers to extracting a range of elements from the array. The format of slicing operation is given here:
The default value for ‘start’ is 0, for ‘stop’ is n-1 (n is number of elements) and for ‘stepsize’ is 1. Counting starts from 0th position. For example, if we write:
a = [10, 11, 12, 13, 14, 15]
Suppose, we write a[:] or a[::] without specifying anything for start, stop and stepsize, it will extract from 0th element till the end of the array. So, all elements are extracted. Suppose, we write a[2:], it starts at 2nd element and ends at last element.