New to python - don't understand why the following seems to skip x=2 ?
a = [1, 2, 3]
for x in a:
print("x=", x)
print("a=", a)
a.remove(x)
print("new a=", a)
returns:
x= 1
a= [1, 2, 3]
new a= [2, 3]
x= 3
a= [2, 3]
new a= [2]
Process finished with exit code 0