6. Sorting by Hand

Swaps and bubble sort

sorted() is built in — but underneath, sorting is just lots of swaps. Bubble sort walks the list, swapping any neighbors that are out of order, until nothing moves.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:Swap two values: a = 5, b = 2. Swap them with a, b = b, a, then kick(a) and snare(b).

Goal
snare
kick
1234
5678