optimization question

Matt Gerrans mgerrans at mindspring.com
Sun Aug 11 16:08:30 EDT 2002


> Wouldn't the following avoid it altogether?
>
>     return (len(t) == j-i) and (s.find(t,i) != -1)

I think you'd want (s.find(t,i) == i) instead.





More information about the Python-list mailing list