The most efficient way to remove duplicates from a list while keeping the original order is to use
dict.fromkeys().Because Python dictionaries preserve insertion order, converting a list into dictionary keys instantly drops duplicate values while keeping everything else exactly in place.
items = [3, 1, 3, 2, 1]
unique = list(dict.fromkeys(items)) # [3, 1, 2]