fork(2) download
  1. lst = [0, 1, 3, 8, 9, 10, 12, 13, 14, 17, 18, 20]
  2. w = []
  3. for i in range(0, len(lst) - 1):
  4. if((lst[i + 1] - lst[i]) > 1):
  5. w.append(lst[i + 1])
  6. print(w)
Success #stdin #stdout 0.02s 44632KB
stdin
Standard input is empty
stdout
[3, 8, 12, 17, 20]