%%writefile test.lab
#
0 230 f
230 350 o
350 470 n
Writing test.lab
def _read_lab(filename: str):
    ret = []
    with open(filename) as file:
        for line in file.readlines():
            if line.strip() == '':
                continue
            if line.startswith('#'):
                continue
            l = line.rstrip().split(' ')
            if len(l) != 3:
                continue
            tmp = {}
            tmp['start'] = l[0]
            tmp['end'] = l[1]
            tmp['phone'] = l[2]
            ret.append(tmp)
    return ret
_read_lab('test.lab')
[{'end': '230', 'phone': 'f', 'start': '0'},
 {'end': '350', 'phone': 'o', 'start': '230'},
 {'end': '470', 'phone': 'n', 'start': '350'}]