Need advice performing a search

François Pinard pinard at iro.umontreal.ca
Wed Apr 26 15:07:53 CEST 2000


scarblac-spamtrap at pino.selwerd.nl (Remco Gerlich) writes:

> from string import find
> def testline(line):
>   return find(line, "first_string") or find(line, "second_string")

Shouldn't we have:

   return find(line, "first_string") >= 0 or find(line, "second_string") >= 0

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list