with open('file') as f:
    for row in reader(f, delimiter='  '):
        if row[0] == 'Y':
            break
if row and row[0] != 'FREQ':
    l.append((floar(row[0]), float(row[1])))
Using Python Reg Exp to read data from file