with open('seq_file') as f1:
    with open('test.csv') as f2:
        for row in csv.reader(f2):
            it = iter(map(int, [_f for _f in row[1:] if _f]))
slices = [slice(*(x, next(it))) for x in it]
seq = next(f1)
line = next(f1).translate(None, whitespace)
print(seq, end=' ')
print(' '.join(line[s] for s in slices))
Concatenating sliced strings based on slice indices in csv file