fork download
  1. n = 6
  2. lista = [0, 2, 4, 6, 8, 10, 0, 3, 6, 9, 12, 15]
  3. print(sorted(set(lista))[:n])
Success #stdin #stdout 0.02s 9316KB
stdin
Standard input is empty
stdout
[0, 2, 3, 4, 6, 8]