• + 0 comments

    Just a small detail, there is no need to convert the set into list if you are going to use the sorted method, you can simple use sorted(set(iterable)).

    sorted(): Return a new sorted list from the items in iterable.