Answers for "python readline remove newline"

3

stripping /n in a readlines for a pytgon file

alist = [line.rstrip() for line in open('filename.txt')]
Posted by: Guest on August-24-2020
2

python remove new line

lines = ("line 1 rn")
lines.rstrip("nr")
Posted by: Guest on February-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language