asked 41.8k views
1 vote
How to remove duplicates from list in python?

2 Answers

6 votes

Sets automatically remove duplicates. You can convert it into a set, convert it back into a list, and run sorted() on the list, or your own sorting algorithm.

answered
User Emeric
by
8.5k points
7 votes
the new way of removing duplicates from an iterable while keeping it in the original order
answered
User Ali Hesari
by
8.1k points