This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients cmaliwal, remi.lapeyre
Date 2020-05-28.16:39:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590683952.97.0.875942719185.issue40809@roundup.psfhosted.org>
In-reply-to
Content
Hi cmaliwal! You are mutating the list while iterating over it which can lead to all sorts of issues, to keep the unique elements of a list you can do 


>>> a = [1, 1, 1, 1]
>>> list(set(a))
[1]


If you think you found a bug in Python please check in the python-help mailing list or StackOverflow.
History
Date User Action Args
2020-05-28 16:39:13remi.lapeyresetrecipients: + remi.lapeyre, cmaliwal
2020-05-28 16:39:12remi.lapeyresetmessageid: <1590683952.97.0.875942719185.issue40809@roundup.psfhosted.org>
2020-05-28 16:39:12remi.lapeyrelinkissue40809 messages
2020-05-28 16:39:12remi.lapeyrecreate