Need advice performing a search

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Wed Apr 26 15:17:35 CEST 2000


François Pinard wrote in comp.lang.python:
> 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

<sigh>. Yes.

-- 
Remco Gerlich,  scarblac at pino.selwerd.nl

   This is no way to be
     Man ought to be free      -- Ted Bundy
       That man should be me



More information about the Python-list mailing list