Swapping Array Elements In Python