I found that i have to perform a swap in python and i write something like this.
arr[first], arr[second] = arr[second], arr[first]
I suppos
I suppose you could take advantage of the step argument of slice notation to do something like this:
myarr[:2] = myarr[:2][::-1]
I'm not sure this is clearer or more pythonic though...