i'm trying to make a code that :
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
Might be small overhead, but if your file isn't too big, I'd just dump every line in a list L, then loop through that list - if row r starts with str1, you can just do L[r+3] and check if it contains 'contain'.