I just print line by line from the loop, and my output looks something like this:
[' 4.0\n', ' 17.2\n', ' 7.0\n'] [' 0.0\n'] [' 4.0\n', ' 16.7\n', ' 4.0\n'] [' 4.0\n', ' 16.7\n', ' 4.0\n'] [' 4.0\n', ' 16.7\n', ' 4.0\n'] [' 4.0\n', ' 16.7\n', ' 4.0\n'] [' 4.0\n', ' 16.4\n', ' 4.0\n']
But in my excel output, I just get the first line something like this:

My expected result:

My current code is here:
count = 0 DataList = [] for line, file in enumerate(PM2Line): if POA in file: DataList.append(file[32:50]) print DataList
Any suggestion or comments.
source share