Python · Variables, assignment and input

Swapping two values

Sorting, reordering and fixing wires that were swapped all come down to exchanging two stored values.