i'm trying to make a code that :
- open a text file
- go to the lines that start with "Start"
- go to line 3 from the lines that start with "start" (previously selected)
- check if that line contain " contain" word
if yes = print " ok " :
str1 = "Start"
with open("C:...test.txt") as file:
for line in file:
if str1 in line:
if "contain" in line:
print "OK"
else:
print "NOK"
i need to integrate the " 3rd line" condition