[Tutor] Not Storing State

Stephen Nelson-Smith sanelson at gmail.com
Fri Feb 27 22:58:08 CET 2009


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.


More information about the Tutor mailing list