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 to avoid keeping state.

How can I do this?

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

Reply via email to