Respuesta :
Answer:
filepath = 'Iliad.txt'
start = 'sometxtstart'
end = 'sometxtend'
apending = False
out = ""
with open(filepath) as fp:
line = fp.readline()
while line:
txt = line.strip()
if(txt == end):
apending = False
if(apending):
out+=txt + '\n'
if(txt == start):
apending = True
line = fp.readline()
print(out)
The program illustrates the use of file and file operations
- First, the program gets the file name as input
- Then the lower and upper bound of the search range
- Then the program reads each line of the input file
- On each line, the program checks if the number is within the search range
- The number is printed, if the above condition is true
At the end of the program, all numbers in the file within the search range are printed
See attachment for further explanation
Read more about files and file operations at:
https://brainly.com/question/15004613