Newbie question on Re module
andrew at indranet.co.nz
Sat Jan 4 20:00:28 CET 2003
Ah nuts, that should be str.index
--On Saturday, January 04, 2003 15:39:18 +0000 Tom Zych
<tztemp14 at pobox.com> wrote:
> Andrew McGregor wrote:
>> if str.index('binaries') == -1:
>> # then str did not contain the word.
> Python 2.2 doesn't return -1 when string.index fails; it raises
> a ValueError exception. Are there older versions of Python that
> return -1?
> Tom Zych
> This email address will expire at some point to thwart spammers.
> Permanent address is rot13(gbzmlpu at cbobk.pbz).
More information about the Python-list