> What's the best way to search a string for a particular word and get a
> booleen value indicating whether it exists in the string or not?

 >>> substring = 'foo'
 >>> targetstring = 'blah foo bar'
 >>> substring in targetstring
True
 >>> if substring in targetstring: print 'yup'
yup

http://docs.python.org/lib/typesseq.html

-tkc




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to