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
Post a Comment