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 cmaliwal
Recipients cmaliwal, remi.lapeyre
Date 2020-05-28.16:44:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590684269.11.0.445023481204.issue40809@roundup.psfhosted.org>
In-reply-to
Content
a = [0, 1, 2, 3, 4, 1, 2, 3, 5]

for i in a:
    if a.count(i) > 1:
        a.remove(i)

print(a)

"""
Output

[0, 4, 1, 2, 3, 5]
"""

It's working fine for the above code.
Yes I can use set for this but I tried with count and remove.
History
Date User Action Args
2020-05-28 16:44:29cmaliwalsetrecipients: + cmaliwal, remi.lapeyre
2020-05-28 16:44:29cmaliwalsetmessageid: <1590684269.11.0.445023481204.issue40809@roundup.psfhosted.org>
2020-05-28 16:44:29cmaliwallinkissue40809 messages
2020-05-28 16:44:29cmaliwalcreate