title: Extracting data from a text file and writing it elsewhere
body: <p>How can I read a file and put the elements in it to a list and write the contents to other file?</p>
  
  <p>the file contents are </p>
  
  <pre>
  this is my house and it is very good
  this is my village and it is the best 
  </pre>
  
  <p><code>good</code> and <code>best</code> has to be repeated 10 times.</p>
  
  <p>help me if possible</p>