ary = [“a”,”b”,”c”,”d”,”b”,”a”] ary2 = list(set(ary)) ary2.sort() print(ary) print(ary2)
[‘a’, ‘b’, ‘c’, ‘d’, ‘b’, ‘a’] [‘a’, ‘b’, ‘c’, ‘d’]