That's the second part of the swap!
Make sure to add list[j] = list[j+1] to your code.
list[j] = list[j+1]