W
Wai Yip Tung
When I do
for line in fp:
the line string usually has a '\n' at the end. In many cases I don't want
the line break character. I can trim it using
if line.endswith('\n'): line = line[:-1]
Given I do it so frequently I wonder if there is some builtin way to say I
don't wnt the line break character?
Thanks,
tung
for line in fp:
the line string usually has a '\n' at the end. In many cases I don't want
the line break character. I can trim it using
if line.endswith('\n'): line = line[:-1]
Given I do it so frequently I wonder if there is some builtin way to say I
don't wnt the line break character?
Thanks,
tung