[Tutor] Getting rid of the newline in file
cpu.crazy at gmail.com
Sat Sep 17 06:35:15 CEST 2005
Hi. I'm using
f = file("foo", 'w')
fileContents = f.readlines()
print fileContents + "Hi!"
and I get:
How can I get rid of that new line? fileContents has Bar.
I wrote the file using Joe (a *nix test editor) and for the new line I
pressed Enter to add Bar.
This is a pain as I don't want the newline.
(No coincidence between my fav. text editor and my name!)
More information about the Tutor