title: Python read txt file as input: IndexError: list index out of range?
body: <p>Here is my code:</p>
  
  <pre><code>if __name__ == '__main__':
    fid = open ('200502.txt')
    data = fid.readlines()
    data = map (string.strip, data)
    x = []
    y = [] 
    da = []
    for d in data:
      s = d.split()
      x.append(float(s[0])/10000.0)
      y.append(float(s[1])/10000.0)
      da.append(float(s[2]))
  </code></pre>
  
  <p>When I run it I got:</p>
  
  <pre><code>Traceback (most recent call last):
    File "plot_data.py", line 286, in ?
      x.append(float(s[0])/10000.0)
  IndexError: list index out of range
  </code></pre>
  
  <p>The 200502.txt (840kb) file is like:</p>
  
  <pre><code>1131087 224529 3.923   
  1131096 224529 3.958 
  1131106 224530 3.897    
  1131116 224530 3.917   
  1131126 224530 3.847 
  (....)
  </code></pre>