Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list to set keep order python

# For Python 3.7+
items = [1, 2, 0, 1, 3, 2]
list(dict.fromkeys(items))

>>> [1, 2, 0, 3]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #set #order #python
ADD COMMENT
Topic
Name
9+1 =