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 suppose this is not so pythonic. Does somebody know how to do a swap in python more elegent?
EDIT: I think another example will show my doubts
self.memberlist[someindexA], self.memberlist[someindexB] = self.memberlist[someindexB], self.memberlist[someindexA]
is this the only available solution for swap in python? I did searched a lot but didn't find a nice answer...