title: Inserting a file's text into another file at a specific line
body: <p>I have two text files <code>test1.txt</code> and <code>test2.txt</code>. I want to be able to read <code>test1.txt</code> contents and write it to <code>text2.txt</code> at a specific line.</p>
  
  <p>I have been able to read the contents of <code>test1.txt</code> and write them to a blank <code>test2.txt</code>.</p>
  
  <p>Now I want to change my code to read context of <code>test1.txt</code> and write them to a non empty <code>text2.txt</code>.</p>
  
  <pre><code>with open("/test1.txt") as f:
      lines = f.readlines()
  
  with open("/test2.txt", "w") as f1:
      f1.writelines(lines)
  </code></pre>
  
  <p>How can I insert the contents of <code>test1.txt</code> to <code>test2.txt</code> at line 20.</p>