list index()
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Thu Aug 30 10:50:09 EDT 2007
On Thu, 30 Aug 2007 09:53:53 -0400, Marshall T. Vandegrift wrote:
> The Python string types have both the method `index()` which throws an
> exception and the method `find()` which implements the same behavior but
> returns -1 for not-found substrings. I would naively have assumed the
> `list` type to provide both as well, but it provides only `index()`.
>
> Anyone know the reason for this lack of parallelism?
Historical reasons and IIRC the `find()` method on strings will go away in
Python 3.0.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list