Using wild character

Zentrader zentraders at
Fri Sep 7 01:48:31 CEST 2007

On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <bj_... at> 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.

More information about the Python-list mailing list