Re: list traversal and remove

2008-01-31 Thread [EMAIL PROTECTED]
Thank you very much for the great anwsers. You guys save my sleep today. -- http://mail.python.org/mailman/listinfo/python-list

Re: list traversal and remove

2008-01-31 Thread Steven D'Aprano
On Wed, 30 Jan 2008 23:49:46 -0800, [EMAIL PROTECTED] wrote: > I supposed the below code will print seven 2 and generate the list li > without 2. > Strangely it only print four 2. If you change the number of 2 in the > list, the results are all beyond expectation. I know the other way to > achiev

Re: list traversal and remove

2008-01-31 Thread Arnaud Delobelle
On Jan 31, 7:49 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I supposed the below code will print seven 2 and generate the list li > without 2. > Strangely it only print  four 2. If you change the number of 2 in the > list, the results are all beyond expectation. > I know the other way to a

list traversal and remove

2008-01-30 Thread [EMAIL PROTECTED]
I supposed the below code will print seven 2 and generate the list li without 2. Strangely it only print four 2. If you change the number of 2 in the list, the results are all beyond expectation. I know the other way to achieve the expected goal, but why this is happening? Could somebody enlight m