Tweeted By @python_tip
Remove duplicates from a list while keeping the order:
— Daily Python Tip (@python_tip) January 17, 2019
>>> from collections import OrderedDict
>>> a = ["foo", "Alice", "bar", "foo", "Bob"]
>>> list(OrderedDict.fromkeys(a).keys())
['foo', 'Alice', 'bar', 'Bob']#python