[Python-Dev] Dafanging the find() gotcha
06 Aug 2002 00:12:07 -0400
Tim> returns the smallest non-negative int i such that
Tim> s2[i : i+len(s1] == s1
Tim> provided such an i exists. That's as sensible as any answer, and more
Tim> sensible than most <wink>, if you have to give a meaning when s1 is empty.
Well, no -- you have to put the missing parenthesis in first.
Here it is..... :-)
Andrew Koenig, email@example.com, http://www.research.att.com/info/ark