Now, I know this kind of question has been kind asked before, but this is slightly different.
I want to use a file main.py to remove MULTIPLE lines from another file targetfile.py
These multiple lines are all together, like:
line_To_Delete1
line_To_Delete2
line_To_Delete3
line_To_Replace1
All these lines will have the comments #del1
, #del2 or something that indentifies it as unique, and the one to delete/replace.
So how do I delete all these lines together?
Also, I want to replace the 4th line with some other line.
How do I do all this?