What does it mean?

what does this statement mean?
a[i::k] = sorted(a[i::k])

a[i::k] means, all elements in the array from the inital index i with a jump of k.
The sorted a[i::k] sorts the elements in that range.
Example- Let the array be a=a=[1,5,4,2,3]
a[1::3] prints- [5,3]
So after sorting, the elements in the range, the final array would be-
a=[1,3,4,2,5]

1 Like

thanks buddy

1 Like