(Jan-03-2021, 11:54 AM)snippsat Wrote: When use f.readlines() it add a \n automatically.Just a small note, that it's not
readlines()
that add \n
. Newline ending is there in the file. And thus also present when just iterate over file-handle f
and @snippsat removes it with strip()
.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs