I know how to swap two variables together but I want to know if there is a quicker way to follow a certain pattern.
So I have this list of number. list=[1,2,3,4,5,6]
And what I want to do is to swap a number with the following one and swap the next number with the number after it. so after swapping them it would become list=[2,1,4,3,6,3]
So I was wondering if there was a way to be able to swap the numbers more simply. Thank you.