using list comprehension
:
In [66]: with open("example.cnf") as f:
print [map(int,line.split("0")[0].split()) for line in f if line and \
not (line.startswith("c") or line.startswith("p"))]
....:
[[1, -3], [2, 3, -1]]
or:
with open("example.cnf") as f:
x= lambda y,c:y.startswith(c)
print [map(int,line.split("0")[0].split()) for line in f if line and \
not any(x(line,z) for z in ("c","p"))]
....:
[[1, -3], [2, 3, -1]]