python said : "1, 2, 3, 6, 7, manbo !"

Rodrigo Benenson rodrigob at elo.utfsm.cl
Wed Jan 21 15:55:49 EST 2004


(corrected the identation)

> At the python2.3.2 prompt
>
> >>> a = range(8)
> >>> for b in a:
> ...........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
>





More information about the Python-list mailing list