stock_lines = [] with open("/data/quantization/stock.log") as f: for x in range(10000): stock_lines.append(eval(f.readline())) print(stock_lines[0])