Globbing in List Search?

Ed Suominen ed-no at spam-eepatents.com
Thu Mar 25 22:16:05 CET 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