Been working at this for quite a while, and I haven't found any examples on this site or any others that seem relevant. I have a list, and what I'm trying to do is pretty simple I think. I just need to search that list to find the key word "Buffer Log". Once I find that keyword, I need to print every line from that line, until the end of the list. Any direction at all would be very much appreciated. It seems like I'm pretty close.
logfile = open('logs.txt', 'r')
readlog = logfile.readlines()
logfile.close()
lines = []
for line in readlog:
lines.append(line)
for x in lines:
if "Log Buffer" in x:
z =lines.index(x)
print(lines[z:]