korean_dave wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
>
No it doesn't. stringb is "hiy" and it "treats" it that way.
(And just what do you mean
On Nov 15, 6:20 am, korean_dave <[EMAIL PROTECTED]> wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
You appear to be gravely mistaken:
| >>> stringa = "hi"
| >>
On Nov 14, 1:20 pm, korean_dave <[EMAIL PROTECTED]> wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
>
> How do I solve this?
Try this:
>>> stringa = 'hi'
>>> st
stringa = "hi"
stringb = "hiy"
I'd like it to return -1 when I do:
returnVal = stringa.find(stringb);
Instead, it treats stringa as "hi" and stringb as "hi".
How do I solve this?
--
http://mail.python.org/mailman/listinfo/python-list