Answers for "python read file between two strings"

0

python read file between two strings

inRecordingMode = False
for line in file:
    if not inRecordingMode:
        if line.startswith('<START>'):
            inRecordingMode = True
    elif line.startswith('<END>'):
        inRecordingMode = False
    else:
        yield line
Posted by: Guest on September-14-2021

Code answers related to "python read file between two strings"

Python Answers by Framework

Browse Popular Code Answers by Language