title: Splitting data file columns into separate arrays in Python
body: <p>I'm new to python and have been trying to figure this out all day. I have a data file laid out as below,</p>
  
  <pre><code>time    I(R_stkb)
  
  Step Information: Temp=0  (Run: 1/11)
  
  0.000000000000000e+000  0.000000e+000
  
  9.999999960041972e-012  8.924141e-012
  
  1.999999992008394e-011  9.623148e-012
  
  3.999999984016789e-011  6.154220e-012
  </code></pre>
  
  <p>(Note: No empty line between the each data line.)</p>
  
  <p>I want to plot the data using matplotlib functions, so I'll need the two separate columns in arrays.</p>
  
  <p>I currently have</p>
  
  <pre><code>def plotdata():
  
  Xvals=[], Yvals=[]
  i = open(file,'r')
  
  for line in i:
      Xvals,Yvals = line.split(' ', 1)
  
  print Xvals,Yvals
  </code></pre>
  
  <p>But obviously its completely wrong. Can anyone give me a simple answer to this, and with an explanation of what exactly the lines mean would be helpful. Cheers.</p>
  
  <p>Edit: The first two lines repeat throughout the file.</p>