title: How to return to original formatting
body: <p>I have broken down lines of text file into individual words to check if they are in a dictionary. I now want to return/print the words back in the same lines.</p>
  
  <p>I have tried editing the positions in my loop as I know I have the lines broken down already. I have thought that maybe I have to use a pop or remove function. I cannot use swap function. </p>
  
  <pre><code>def replace_mode(text_list,misspelling):
      for line in text_list:
          word = line.split(' ')
          for element in word:
              if element in misspelling.keys():
                  print(misspelling[element], end=(' '))
              else:
                  print(element, end=(' '))
  </code></pre>
  
  <p>It is printing in a single line:</p>
  
  <blockquote>
    <p>"joe and his family went to the zoo the other day the zoo had many animals including an elephant the elephant was being too dramatic though after they walked around joe left the zoo" </p>
  </blockquote>
  
  <p>I want the processed text to be back in its original format(4 lines):</p>
  
  <blockquote>
    <p>joe and his family went to the zoo the other day<br/>
    the zooo had many animals including an elofent<br/>
    the elaphant was being too dramati though<br/>
    after they walked around joe left the zo<br/></p>
  </blockquote>