oddness in string.find(sub,somestring)

Max M maxm at mxm.dk
Wed Mar 30 13:57:02 CEST 2005


MyHaz wrote:

>>>>import string
>>>>searched_string="abcdefg"
>>>>substring="123"
>>>>print string.find(substring,searched_string)
> -1
> 
>>>>searched_string=""
>>>>print string.find(substring,searched_string)
> 
> 0
> 
> 
> why would this be? And when is someone going to fix it :P
> 

I don't know. When are you going to fix it?



-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Python-list mailing list