Replace given line in files in Python
<p>I have several files, and I need to replace third line in them:</p>

<pre><code>files = ['file1.txt', 'file2.txt']
new_3rd_line = 'new third line'
</code></pre>

<p>What is the best way to do this?</p>

<p>Files are big enough, several 100mb's files.</p>
