List Value Swapping in the Same List

I want to do something like x[1]->x[2],x[2]->x[1] but it isn’t working because of the weird indices rules, is there a way to do this or am I boned?

Hi! One option is something like this:

Thanks a ton, it works!

Here’s the same idea but written as a general function: