I am stuck on a problem I am working on.
It involves opening a file reading a line and then comparing the next two lines in the file to it. Then move down one line, ie second line in the file and then compare the next two lines to it again.
I am having a hard time creating a loop that will go through these steps.
So far I have done this
write_file = input_file[:-3] + "bak"
read_file = input_file
with open(write_file, "w") as write:
with open(read_file,"r") as read:
for line in read:
line1 = line
Thank you.