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.
6.5m questions
8.6m answers