Input:
input1.txt
classified
zoologists
The lower bound of a search range is typically represented as a string that is less than or equal to the target value, while the upper bound of a search range is typically represented as a string that is greater than or equal to the target value.
input_file = 'input1.txt' #input('File name:')
start = 'ammoniated' #input('Upper bound:')
end = 'millennium' #input("Lower bound:")
with open(Input_file, 'r') as f:
contents = f.readlines()
for i in range(len(contents)):
if (contents[i] >= start) and (contents[i] <= end):
print(contents[i],end='')
input_file, start and end are supposed to be user enterable, but I have commented them out and hard coded them for ease of testing.
To learn more about strings refer to:
https://brainly.com/question/20813205
#SPJ4