I have the following code
if "[FAILED]" in line and (("Result:" not in line) or ("Date:" not in line)):
print line
I'm reading a text file line by line. I want to look for anywhere in the text file "[FAILED] but it cant have "Result:" or "Date:" in the same line.
My code currently prints out the line even it has result or date in it.
Any help would be appreciated.
Thanks.