Inputting data from a text file with multiple numbers on each line - Python
Question: Lets say I have a data file that has this inside it:

    
    
    23 33 45
    91 81 414
    28 0 4 
    7 9 14
    8 9 17
    1 1 3
    38 19 84
    

How can I import it into a list so that each individual number it its own
item?


Answer: You can use, numpy loadtxt to read the data file to a numpy array

    
    
      from numpy import loadtxt
      a,b,c = loadtxt("filename", usecols=(0,1,2), unpack=True)
    

Output

    
    
      a = array([23, 91, 28, 7, 8, 1, 38])
    

