title: Converting a .dat file into an array
body: <p>I have a .dat file generated from MATLAB (with float values). I need to convert it to an array containing the same number of rows and columns as it did in the .dat file. Could anyone suggest a way of doing this? There is a <code>\n</code> at the end of each line which I want to remove. The .dat file read into Python looks like this:</p>
  
  <blockquote>
    <p>12,18\n42,17\n60,16\n86,17\n120,17\n137,12\n169,10\n189,14\n215,9\n248,11\n273,12\n301,17\n319,8\n345,17\n378,14\n403,10\n423,10\n453,18\n483,10\n507,15\n10,43\n43,44\n60,38\n96,41\n114,41\n139,41\n168,43\n189,40\n215,37\n248,45\n268,45\n301,37\n321,35\n</p>
  </blockquote>
  
  <p>And I would like the output to be in the following format:</p>
  
  <pre><code>12,18
  42,17
  ...
  </code></pre>
  
  <p>where <code>12,42</code> and <code>18,17</code> are in different columns.</p>