fork download
  1. a = [1, 3, 7, 1, 6, 8, 2, 4, 7, 3, 5, 6, 2]
  2. s = set()
  3. print([s.add(x) or x for x in a if x not in s])
Success #stdin #stdout 0.02s 9156KB
stdin
Standard input is empty
stdout
[1, 3, 7, 6, 8, 2, 4, 5]