RE Module Question.

Paul Winkler slinkp23 at
Tue Nov 6 06:49:38 CET 2001

On Mon, 5 Nov 2001 23:50:13 -0500, Adonis Vargas
<deltapigz at> wrote:
>test = "this is a test"
>if "test" in test: print "found string."
>this is just pseudocode to get the concept im trying to achieve.

We just had a thread on this a few days ago... try the archives at

You can do it like so:

test = "this is spam"
if test.find("spam"): print "found it"

Also, look at
for a nice alternative to regular expressions.

More information about the Python-list mailing list