Globbing in List Search?

Ed Suominen ed-no at spam-eepatents.com
Thu Mar 25 16:16:05 EST 2004


Your reply, particularly what's quoted below, was very helpful. Thank you.

- Ed Suominen

Peter Otten wrote:

>>>> def index(names, pattern):
> ...     for i, n in enumerate(names):
> ...             if fnmatch.fnmatch(n, pattern):
> ...                     return i
> ...     return -1




More information about the Python-list mailing list