import numpy as np def process_file( filename,l1,l2): fp = open(filename,'r') for line in fp: line = line.strip() words = line.split() l1.append(words[0]) # get the first column to l1 l2.append(words[1]) # get the second column to l2 def Analysis(l1,l2): Num1 = np.array(l1,float) Num2 = np.array(l2,float) print Num1.mean() print Num2.mean() print Num1.min() print Num2.min() print Num1.max() print Num2.max() Num12 = Num1+Num2 print Num12 Num12 = Num1-Num2 print Num12 Num12 = Num1*Num2 print Num12 # Define a main() function to test all of your functions. def main(): l1 = list() l2 = list() process_file("data.txt",l1,l2) print "list 1" + str(l1) print "list 2" + str(l2) Analysis(l1,l2) # This is the standard boilerplate that calls the main() function. if __name__ == '__main__': main()