[Tutor] string codes

spir denis.spir at gmail.com
Thu Nov 28 13:52:29 CET 2013


On 11/28/2013 02:12 AM, Walter Prins wrote:
> Sorry to wade in after all the other answers you've had, but a)
> string.find() does not *require* start and end indexes, they are optional:
> http://docs.python.org/2/library/string.html    And b) if you're just trying
> to find out whether a substring exists in a string (which I'm getting the
> impression you're all you're doing), you can use "in":

It's about parsing: I'm not trying to find whether it is _anywhere_ in source, 
but _there_ at the present index.
Thank you, anyway.

denis


More information about the Tutor mailing list