Dealing with the Tkinter Text Widgets Indexing System.
Note that line/column indexes may look like floating point values, but it’s seldom possible to treat them as such (consider position 1.25 vs. 1.3, for example). I sometimes use 1.0 instead of “1.0” to save a few keystrokes when referring to the first character in the buffer, but that’s about it.
You should have mentioned the context in the OP (Tkinter Text Widget). What you're doing has nothing to do with floating-point numbers at all. You're just finding a period, followed by an integer. You should never store this value in any floating-point variable. (Doing so could have dire consequences.)