This question has been covered at length:
How to read numbers from file in Python?
e.g., the basic idea is to read each line and parse it as need be
Your example might be:
def input_file(filename):
coefficients = []
with open(filename,'rt') as file:
for line in file: # loop over each line
coefficients.append(float(line)) # parse them in some way
return coefficients
If the coefficients we more complicated than 1-number-1-line, your parsing method would have to change; I doubt your circumstances require anything too complicated
...
for line in file:
# say the numbers are separated by an underscore on each line
coefficients.append([float(coef) for coef in line.split('_')])
It doesn't really matter what format you retrieve them in. What is important is that you cast them to some kind of number, since input is typically read a a string