At the python2.3.2 prompt
[color=blue][color=green][color=darkred]
>>> a = range(8)
>>> for b in a:[/color][/color][/color]
if b == 4:
a.remove(b)
else:
print b
0
1
2
3
6
7
Why 5 does not appear ? (this was the source of a deep bug in a 4000+
lines networked program...)
RodrigoB
[color=blue][color=green][color=darkred]
>>> a = range(8)
>>> for b in a:[/color][/color][/color]
if b == 4:
a.remove(b)
else:
print b
0
1
2
3
6
7
Why 5 does not appear ? (this was the source of a deep bug in a 4000+
lines networked program...)
RodrigoB
Comment