Python Lire le fichier entre deux chaînes

inRecordingMode = False
for line in file:
    if not inRecordingMode:
        if line.startswith('<START>'):
            inRecordingMode = True
    elif line.startswith('<END>'):
        inRecordingMode = False
    else:
        yield line
Beautiful Boar