Deleting a line in multiple files in python
<p>i am a beginner in python and i am practicing at the moment.</p>

<p>So what I want to do is a script that finds a line that I am writing with raw_input and that will search this line in multiple files and delete it.
Something like this but for more files:</p>

<pre><code>word = raw_input("word: ")
f = open("file.txt","r")
lines = f.readlines()
f.close()
f = open("file.txt","w")
for line in lines:
  if line!=mail+"\n":
    f.write(line)
f.close()
</code></pre>

<p>It's an easy task but it's actually hard for me since I can't find an example anywhere.</p>