Alan Gauld wrote:
"Antonio de la Fuente" <t...@muybien.org> wrote
> if not line.isspace() and not line == 'foo':
> fileOut.write(line)
But then, the new log file will have all the blocks, even the ones that
had 'foo' on it, even if the foo lines weren't there anymore. No? or
is there anything that I don't get?
I think the test should be:
if not line.isspace and 'foo' not in line:
fileOut.write(line)
No - that misses the objective of eliminating blocks containing 'foo'
--
Bob Gailer
Chapel Hill NC
919-636-4239
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor