4 ms·
If you don't have set (< python 2.4): def distinct(l): d = {} map(setitem, (d,)*len(l), l, []) return d.keys()
by earle 19y ago
If you don't have set (< python 2.4):
def distinct(l):
d = {}
map(setitem, (d,)*len(l), l, [])
return d.keys()