Exercise 2: Reverse a List In Place — Possible Solution ==================================================================== numbers = [10, 20, 30, 40, 50, 60] left = 0 right = len(numbers) - 1 while left < right: numbers[left], numbers[right] = numbers[right], numbers[left] left += 1 right -= 1 print(numbers) Output: [60, 50, 40, 30, 20, 10] WHY THIS WORKS AS AN ANSWER ------------------------------ Two pointers start at opposite ends of the list and swap the elements they point to, then both move one step toward the middle. The loop condition "left < right" is what makes this self-limiting: once the pointers meet or cross (for a list with an odd number of elements, they meet at the middle element, which never needs swapping with itself), the loop stops automatically. Each iteration moves BOTH left forward and right backward, so the loop is guaranteed to terminate after roughly len(numbers) // 2 swaps — there's no separate "have I reached the end" check needed the way there is when walking a list with a single index. The tuple-style swap on one line, numbers[left], numbers[right] = numbers[right], numbers[left], works because Python evaluates the whole right-hand side (building a temporary tuple of both original values) before assigning anything on the left — so no manual temp variable is needed the way it would be in Java or JavaScript.