By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

index and find

P: n/a
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 <sa************> wrote:
I have installed Python 2.3 and I type "help()" and then "Keywords".
I get a list of words. And it says that I can enter any of the words
to get more help. I enter
"and" and I get the following error message:
"Sorry, topic and keyword documentation is not available because the Python
HTML documentation files could not be found. If you have installed them,
please set the environment variable PYTHONDOCS to indicate their location.."

but I have set both the environment variable, with the path to be
C:\Python23\Doc which includes python23.chm
Why I still got the above error message?

Oct 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
>>> s = 'foobar'
s.find('z') -1 s.index('z')

Traceback (most recent call last):
File "<pyshell#32>", line 1, in -toplevel-
ValueError: substring not found
Pretty self explanatory.

Oct 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.