"Alan Gauld" <alan.ga...@btinternet.com> wrote

How do I make this code print lines NOT containing the string 'Domains'?


Don't use regex, use in:

for line in log:
    if "Domains" in line:
        print line

Should, of course,  be

      if "Domains" not in line:
          print line

Alan G.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to