On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
> > To do a "*string" wildcard filter use the endswith() function instead
> > of startswith() and to do a *string* type wildcard filter use
> > the find() function > -1.
>
> Maybe better the ``in`` operator for the '*string*' type.  `str.find()`
> will go away in the future.
>
> Ciao,
>         Marc 'BlackJack' Rintsch

string.find serves a useful purpose in that it returns the starting
location of the string found, or -1 if not found, so if you wanted to
slice "abdecf" on"c", string.find will tell you where that is.

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

Reply via email to