mylist = ["a", "b", "b", "c", "a"] mylist = sorted(set(mylist)) print(mylist)
mylist = ["a", "b", "a", "c", "c"] mylist = list(dict.fromkeys(mylist))