In my penultimate line (next to the last) of all the files in a specific directory, I have a list of integers:
[142356, 12436546, 131434645, 56464]
I would like to read this penultimate line from all the files from this particular directory and use it again as a list in my new python script containing the same values, of course. Therefore, I can process these lists again.
All text file names begin with the symbol "chr" and end with ".txt"
source
share