title: Parsing a linear system from file
body: <p>In a text file, i enter a linear system with 3 equations. (ex: a1x+b1y+c1z=r1, a2x+b2y+c2z=r2.. etc) </p>
  
  <p>I want to solve this system using matrix rules. For this, i have to parse the system into 2 vectors. </p>
  
  <p>[[a1,b1,c1],[a2,b2,c2],[a3,b3,bc3]] and [r1,r2,r3]</p>
  
  <pre><code>with open('file.txt', 'r') as fd: s = list(map(lambda x: [int(coef) for coef in x.split('+')] , fd.read().replace(' ','').replace('x','') \
                                               .replace('y','').replace('z','').replace('=','+').replace('-','+').split('\n')))
  </code></pre>
  
  <p>For now I have done the code above, but what i parse is [[a1,b1,c1,r1],[a2,b2,c2,r2],[a3,b3,c3,r3]]</p>