"Stephen Nelson-Smith" wrote
I want to iterate over a bunch of lines;
for line in
If any line contains a certain string, I want to do something,
otherwise do something else.
if in line:
doSomething()
else:
doSomethingElse()
I can store state - eg line 1 - did it contain th
Hi,
This is both a general question and a specific one.
I want to iterate over a bunch of lines; If any line contains a
certain string, I want to do something, otherwise do something else.
I can store state - eg line 1 - did it contain the string? no.. ok
we're cool, next line
But, I'd like