Checking a string against multiple matches

alex23 wuwei23 at gmail.com
Tue Dec 2 10:10:22 EST 2008


On Dec 2, 10:09 pm, Chris <cwi... at gmail.com> wrote:
> On Dec 2, 3:01 am, alex23 <wuwe... at gmail.com> wrote:
> > The only time I'd expect it to do partial matches is if you were doing
> > string.index(string), rather than list.index(string):

> It would if the OP was iterating over the list and checking that item
> with .index so it uses the string.index instead of list.index

Which is what I was implying when I wrote "The only time I'd expect it
to do partial matches is if you were doing string.index(string),
rather than list.index(string)", oddly enough :)



More information about the Python-list mailing list