Source Code:
(back to article)
from collections import OrderedDict original_list = [1, 2, 3, 4, 2, 3, 4, 5] unique_list = list(OrderedDict.fromkeys(original_list)) print(unique_list)
Result:
Report an issue