title: How to format a text file using Python or any other programming/scripting language?
body: <p>I would like to know how to format a text file using Python or any other programming/scripting language?</p>
  
  <p>current format in text file is like this:</p>
  
  <pre><code>ABALONE
  Ab`a*lo"ne, n. (Zoöl.)
  
  Defn: A univalve mollusk of the genus Haliotis. The shell is lined
  with mother-of-pearl, and used for ornamental purposes; the sea-ear.
  Several large species are found on the coast of California, clinging
  closely to the rocks.
  </code></pre>
  
  <p>I want it to be like this (all on one line excluding some words etc.):</p>
  
  <pre><code>ABALONE : A univalve mollusk of the genus Haliotis. The shell is lined with
  </code></pre>