f = open("datafile.txt", "r") data = [line.split('\t') for line in f] f.close() pressure = [float(d[1]) for d in data] temp = [float(d[2]) for d in data] ---------------------------------------------------
This will parse the file into a matrix stored in 'data'. The last two lines simply iterate through second and third columns respectively, converting each element to a float (from string as it was read in from file) and assign to the appropriate vars. -- http://mail.python.org/mailman/listinfo/python-list