Feb-02-2020, 10:58 PM
I have a Textfile that contains several Lines, but just contains $0d as new Line instead of $0d $0a
When i load this into a List with
"8890 \r11.19.19\rGRIDDYP-+1D/EX\rPRG\r46 \r8890 \r11.19.19\rTESTFILE2018\rPRG\r132 \r8890 \r11.19.19\rTESTFILE2019\rPRG\r132"
But how do i convert this to an array which uses the \r as splitter ? or how to read this onto an array with just $0d as new line Indicator ?
When i load this into a List with
with open(filename)as f: lines =f.readlines() print(lines)The result is a list (lines) which contains just one Item which looks like :
"8890 \r11.19.19\rGRIDDYP-+1D/EX\rPRG\r46 \r8890 \r11.19.19\rTESTFILE2018\rPRG\r132 \r8890 \r11.19.19\rTESTFILE2019\rPRG\r132"
But how do i convert this to an array which uses the \r as splitter ? or how to read this onto an array with just $0d as new line Indicator ?