Exercise 3 solution import copy bad = [[0] * 3] * 3 good = [[0] * 3 for _ in range(3)] bad[1][1] = 5 good[1][1] = 5 print(bad) print(good) Output: [[0, 5, 0], [0, 5, 0], [0, 5, 0]] [[0, 0, 0], [0, 5, 0], [0, 0, 0]] Explanation: [[0] * 3] * 3 repeats one reference to a single row three times, so a change through any row shows in all of them. The comprehension runs [0] * 3 afresh on every pass, creating three separate rows. Independent copy (a shallow copy such as good[:] would still share rows): clone = copy.deepcopy(good) clone[0][0] = 9 print(good) print(clone) Output: [[0, 0, 0], [0, 5, 0], [0, 0, 0]] [[9, 0, 0], [0, 5, 0], [0, 0, 0]]