Answers for "list(set()) python remove order"

1

list(set()) python remove order

>>> x = [1, 2, 20, 6, 210]
>>> sorted(set(x), key=x.index)
[1, 2, 20, 6, 210]
Posted by: Guest on November-20-2020

Code answers related to "list(set()) python remove order"

Python Answers by Framework

Browse Popular Code Answers by Language