demo_howto_remove_duplicates.py:
mylist = ["a", "b", "a", "c", "c"] mylist = list(dict.fromkeys(mylist)) print(mylist)
C:\Users\My Name>python demo_howto_remove_duplicates.py
['a', 'b', 'c']