My Python code generates a list everytime it loops:
list = np.genfromtxt(\'temp.txt\', usecols=3, dtype=[(\'floatname\',\'float\')], skip_header=1) >
list = np.genfromtxt(\'temp.txt\', usecols=3, dtype=[(\'floatname\',\'float\')], skip_header=1)
You want to create an empty list, then append the created list to it. This will give you the list of lists. Example:
>>> l = [] >>> l.append([1,2,3]) >>> l.append([4,5,6]) >>> l [[1, 2, 3], [4, 5, 6]]