I have a text file containing data as given below. I have to extract all lines containing signed
The document was signed on July 12
The document was signed by Charlie
This document was assigned to John
The document was preassigned to Amanda
Expected output:
The document was signed on July 12
The document was signed by Charlie
If I am using:
for line in file:
if "signed" in line:
print (line)
It is printing all the lines