Iteration over Lists and Strings
Terry Reedy
tjreedy at udel.edu
Sat Aug 28 05:37:25 EDT 2004
"DeepBleu" <DeepBleu at DeepBleu.org> wrote in message
news:cUSXc.56768$xi6.42946 at fe2.texas.rr.com...
> (expected result:
When something does not act as expected, look in the manual or try the
builtin help facility, which only takes seconds.
>>> help(list.index)
Help on method_descriptor:
index(...)
L.index(value) -> integer -- return index of first occurrence of value
dir(object) will give you a list of attributes and methods. You can look
up new ones the same way. In particular, dir(list) and dir(__builtins__).
Terry J. Reedy
More information about the Python-list
mailing list