Jul-18-2018, 09:02 AM
Try to use what @buran suggested, his script is more efficient than mine.
About the "wire", there is no "wire" in file1.txt, so the condition will not be satisfied.
Are you testing with different file1.txt?
PS: When using open() you have to pass a string as the file name, in your code you need to change it to
About the "wire", there is no "wire" in file1.txt, so the condition will not be satisfied.
Are you testing with different file1.txt?
PS: When using open() you have to pass a string as the file name, in your code you need to change it to
open('file1.txt', "r")
.