title: Python - Parsing Conundrum
body: <p>I have searched high and low for a resolution to this situation, and tested a few different methods, but I haven't had any luck thus far. Basically, I have a file with data in the following format that I need to convert into a CSV:</p>
  
  <pre><code>(previously known as CyberWay Pte Ltd)
  0 2019
  01.com
  0 1975
  1 TRAVEL.COM
  0 228
  1&amp;1 Internet
  97 606
  1&amp;1 Internet AG
  0 1347
  1-800-HOSTING
  0 8
  1Velocity
  0 28
  1st Class Internet Solutions
  0 375
  2iC Systems
  0 192
  </code></pre>
  
  <p>I've tried using re.sub and replacing the whitespace between the numbers on every other line with a comma, but haven't had any success so far. I admit that I normally parse <em>from</em> CSVs, so raw text has been a bit of a challenge for me. I would need to maintain the string formats that are above each respective set of numbers.</p>
  
  <p>I'd prefer the CSV to be formatted as such:</p>
  
  <pre><code>foo bar
  0,8
  foo bar
  0,9
  foo bar
  0,10
  foo bar
  0,11
  </code></pre>
  
  <p>There's about 50,000 entries, so manually editing this would take an obscene amount of time.</p>
  
  <p>If anyone has any suggestions, I'd be most grateful.</p>
  
  <p>Thank you very much.</p>