How come tuples don't have an index method?

David Bolen db3l at fitlinxx.com
Sat Sep 8 02:02:13 CEST 2001


"Terry Reedy" <tjreedy at home.com> writes:

> Does it have operator.indexOf ()?  Code would be nearly same.

Yep:

    >>> import operator
    >>> help(operator.indexOf)
    Help on built-in function indexOf:

    indexOf(...)
	indexOf(a, b) -- Return the first index of b in a.


--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list