Bear with i am new to programming. I am trying to create a program that will print a specific chunk of lines from a file, wait for a users input and then print another specific chunk etc. Essentially, a program that prints lines [1, 2 and 3], asks the user for their input and then prints lines [4, 5 and 6] etc.
By specific i only mean certain lines from the external text file
I have no idea how to do this essentially, and am only really able to print specific lines from a file.
lines = []
for line in enumerate(open("mathsquiz.txt" , "r")):
lines.append(line)
targetlines = [4, 5, 10, 11, 16, 17, 22, 23]
for line in lines:
if line[0] not in targetlines:
print(line[1])