Re: index and find
>>> s = 'foobar' >>> s.find('z') -1 >>> s.index('z') Traceback (most recent call last): File "", line 1, in -toplevel- s.index('z') ValueError: substring not found Pretty self explanatory. -- http://mail.python.org/mailman/listinfo/python-list
index and find
what is the difference between index and find in the module of string? for both "find" and "index", I got the position of the letter. On 10/19/05, Shi Mu <[EMAIL PROTECTED]> wrote: > I have installed Python 2.3 and I type "help()" and then "Keywords&q