1. The length taken as the last index
the whole output: the program stops at that lineWhat not to write
“a = [8, 3, 12, 0, 7, 4], so the last element is a[len(a)], that is a[6] = 4.”
What to write
“The last element is a[len(a) - 1] = a[5] = 4. a[6] stops the program with an IndexError.”
Why: Indices start at 0, so n cells end at index n - 1; len(a) counts the cells, it does not name one.