python - Trying to assign an str.find return to a variable -


i want assign str.find() return variable besides str.find, i'm not sure how go doing that.

you use = assign it.

mystr = '123.456' dotpos =  mystr.find('.') 

now variable dotpos contain 3.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -