Aug-10-2020, 03:29 AM
I do not know what that means "Why don't you just join lines[index-4] to lines[index+4]?"
Line ("".join(lines[max(0,index-4):index])) works fine.
It is 4 lines after a "match' Im having problem with.
I tried adding one more print statement but it does not print anything
Line ("".join(lines[max(0,index-4):index])) works fine.
It is 4 lines after a "match' Im having problem with.
I tried adding one more print statement but it does not print anything
print("".join(lines[max(0,index-4):index])) # print 4 lines preceeding it print("".join(lines[max(0,index+4):index])) # print 4 lines after itthank you.