title: Copy one file content (data) to other file file in the specific area using python Logic
body: <p>I Have the good experience in C programming languange and started to work on python with the C Backround. </p>
  
  <p>We have the file with Names for Example 1.txt and 2.txt. i am taking  all the Content of 1.txt and writing in to 2.txt from the given line number and the all the lines in 2.txt will be moved down automtically - For this i am using below logic:</p>
  
  <pre><code>f = open("1.txt", "r")
  contents = f.readlines()
  f.close()
  
  with open("2.txt") as f:
      data = f.read().rstrip("\n")   
  
  line =19
  contents.insert(line, data)
  
  f = open("1.txt", "w")
  contents = "".join(contents)
  f.write(contents)
  f.close()
  </code></pre>
  
  <p>This logic is working very well but the Problem which i am facing is the last line is written immideatly after the 1.txt Content. ( But as per my requiremnt it is has to start form next line) even i tried with "\n" but i am not able to achive.</p>
  
  <p>For more clarity like below.</p>
  
  <p>1.txt :</p>
  
  <pre><code>   hello
      hello
      hello
      hello
  </code></pre>
  
  <p>2.txt:</p>
  
  <pre><code>123
  456
  789
  451
  234
  </code></pre>
  
  <p>suppose if i execute my code for the above 1.txt and 2.txt files ( and i want to write my data between 789 and 451).</p>
  
  <p>after executing script the 2.txt Looks like below:</p>
  
  <pre><code>123
  456
  789
  hello
  hello
  hello
  hello 451
  234
  </code></pre>
  
  <p>Here "Hello 451" is making my logic not to work next time.</p>
  
  <p>So i want to achive like below:</p>
  
  <pre><code>123
  456
  789
  hello
  hello
  hello
  hello 
  451
  </code></pre>
  
  <p>Please kinldy share the solution or guide me to achive this logic.
  234</p>