Q:

convert multiple values in one string to float

I have a string like this -99.00 -99.00  99.00   9.00 -99.00 and I want to convert all the numbers inside the string to float values and then append them to an array, how could I achieve that?
Between the values 99.00 and 9.00 there are 3 white spaces separating them .
The append part I would be able to do by myself if knew how to convert the values one by one. 

A:

A pythonic way to do this is using a list comprehension and split
my_string = '-99.00 -99.00 99.00 9.00 -99.00'
arr = [float(x) for x in my_string.split(' ')]
print(arr)

Output:
[-99.0, -99.0, 99.0, 9.0, -99.0]

