list prob
Gabe Newcomb
Gabe.Newcomb at noetix.com
Tue May 21 18:02:33 EDT 2002
string.find() returns -1 if the string isn't found, instead of the
ValueError thrown by string.index()
-----Original Message-----
From: kemu [mailto:kemusoft at hotmail.com]
Sent: Tuesday, May 21, 2002 2:49 PM
To: python-list at python.org
Subject: list prob
I want to search a list if I do list.index("word to search") and the
word
isn't in the list I get an error I don't want to get one from python but
want my own error like word is not in the list how ?
or is there an other way to search the list for strings and if he
doesn't
find one he doesn't print an error ?
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list