Reading data file with varying number of columns python
<p>I have a data-file the first 8 lines of which look like this. (after substituting actual
values by letters for clarity of this question)</p>

<pre><code>    a,b,c
    d
    e,f
    g,h
    i,j,k
    l
    m,n
    o,p
</code></pre>

<p>These represent data about transformers in an electric network. The first 4
lines are information about transformer 1, the next four about transformer 2 
and so on.</p>

<p>The variables a-p can are either integers, floating-point numbers or strings</p>

<p>I need to write a script in python so that that instead of data for one transformer being spread onto 4 lines, it should all be on one line. </p>

<p>More precisely, I would like the above 2 lines  to be converted into </p>

<pre><code>  a,b,c,d,e,f,g,h
  i,j,k,l,m,n,o,p
</code></pre>

<p>and write this to another data-file.<br>
How do I do this?</p>
