If you're trying to convert lines of floats separated by tab characters, then just float(line)
will try to convert the whole line into one float, which will fail if there's more than one. Using strip
to get rid of leading and trailing whitespace isn't going to help that fundamental problem.
Maybe you need to split
each line into pieces and do something with each piece?