Demo entry 6645453



Submitted by anonymous on Oct 10, 2017 at 13:21
Language: Python 3. Code size: 203 Bytes.

# preserve order
from collections import OrderedDict
my_list_no_duplicates = OrderedDict((x, True) for x in my_list).keys()

# don't need to preserve order
my_list_no_duplicates = list(set(my_list))

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).