title: Create an array from data in a table using Python
body: <p>I want to get data from a table in a text file into a python array. The text file that I am using as an input has 7 columns and 31 rows. Here is an example of the first two rows:</p>
  
  <pre><code>10672   34.332875   5.360831    0.00004035881220    0.00000515052523    4.52E-07    6.5E-07
  
  12709   40.837833   19.429158   0.00012010938453    -0.00000506426720   7.76E-06    2.9E-07
  </code></pre>
  
  <p>The code that I have tried to write isn't working as it is not reading one line at a time when it goes through the for loop. </p>
  
  <pre><code>data = []
  f = open('hyadeserr.txt', 'r')
  while True:
      eof = "no"
      array = []
  for i in range(7):
      line = f.readline()
      word = line.split()
      if len(word) == 0:
          eof = "yes"
      else:
          array.append(float(word[0]))
          print array
  if eof == "yes": break
  data.append(array)
  </code></pre>
  
  <p>Any help would be greatly appreciated. </p>