lst = [0, 1, 3, 8, 9, 10, 12, 13, 14, 17, 18, 20]
w = []
for i in range(0, len(lst) - 1):
if((lst[i + 1] - lst[i]) > 1):
w.append(lst[i])
w.append(lst[i+1])
print(set(w))
bHN0ID0gWzAsIDEsIDMsIDgsIDksIDEwLCAxMiwgMTMsIDE0LCAxNywgMTgsIDIwXQp3ID0gW10KZm9yIGkgaW4gcmFuZ2UoMCwgbGVuKGxzdCkgLSAxKToKICAgIGlmKChsc3RbaSArIDFdIC0gbHN0W2ldKSA+IDEpOgogICAgICAgIHcuYXBwZW5kKGxzdFtpXSkKICAgICAgICB3LmFwcGVuZChsc3RbaSsxXSkKcHJpbnQoc2V0KHcpKQ==
set([1, 3, 8, 10, 12, 14, 17, 18, 20])