What is the best way to fix the error given in the run? I also somewhat understand that a list cannot change while being iterated over, but it still seems a little abstract.
myList = ["A", "B", "C", "D", "E", "F", "G"]
for i in range(len(myList)-4):
if i == 2:
del myList[4]
print(i, myList[i])
0 A
1 B
2 C
>>> myList
['A', 'B', 'C', 'D', 'F', 'G']