if you are looking to pull a float out of a var char field that has for example text wrapped around it (i.e. "Temp: 26.2 Degrees") then I would suggest using preg_match or something alike to do a regular expression to extract it. I'm sure there is other ways too.
$fullstring = "hello, my name is jack.. my height is 5.5 feet";
preg_match_all('/[0-9].[0-9]/', $fullstring, $matches);
$count = count($matches);
# this will tell you how many times "x.x" was found in string
# this will print out each "x.x" it found
for ($i = 0 ; $i < $count ; $i++ )
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: