Skip to main content

Python: List -> Set

mylist = [1, 2, 2, 3]
myset = set(mylist)

print myset
[1, 2, 3]

Comments