Have to try

kosh at aesaeion.com kosh at aesaeion.com
Sun Feb 17 05:13:05 CET 2002


On Sat, 16 Feb 2002, Rick Hamilton wrote:

> So I am trying to do a (what should be) simple thing. I have a string stored
> in a variable. I want to search that string for the occurrence of a sub
> string. I have tried
> Find(s,sub)
> Rfind
> MyString.find(sub)
>

I think you might find count to be more appropriate if you just want to
know if it has some string.





More information about the Python-list mailing list