Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list unique in order

>>> items = [1, 2, 0, 1, 3, 2]
>>> list(dict.fromkeys(items))  # Or [*dict.fromkeys(items)] if you prefer
[1, 2, 0, 3]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #unique #order
ADD COMMENT
Topic
Name
7+3 =