[issue41454] while loop bug on list

2020-08-01 Thread Dexter Ramos
Dexter Ramos added the comment: Thank you Mr. Erick Smith. Now I know. I also tried to find the hard way like this: finding nemo- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4] --->index [4, 1, 2, 5, 7, 4, 2, 8, 9, 5, 3, 2, 4, 6] --->original list /

[issue41454] while loop bug on list

2020-08-01 Thread Eric V. Smith
Eric V. Smith added the comment: You're mutating the list while iterating over it, which is causing the behavior you're seeing. This isn't a bug. See for example https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list Also, when reporting bugs in the future

[issue41454] while loop bug on list

2020-08-01 Thread Dexter Ramos
New submission from Dexter Ramos : The output should have no duplicates but it has. When I added another "5" on the list it goes okay and is still okay if I add more. But when there is only two 5's it won't do its job. -- components: Windows files: app.py messages: 374661 nosy: Dexter