List problem

Thomas M. thomas.sunshine at web.de
Fri Oct 29 19:15:02 CEST 2004


Hello,

i have a question on the following code.


test_list = [1, 2, 3]

for i in test_list:
   print i

   if 1 in test_list:
      test_list.remove(1)


Why is the second item not print ?
Is that a bug or a feature ?!


Thanks,
Thomas



More information about the Python-list mailing list