Alan G wrote:

>> f = file("foo", 'w')
>
>
> Using 'w' will destroy the contents of the file, I assume you are 
> really using 'r'?

Ah yes.. sorry.

>
> Each line will be terminated by a newline, you can use rstrip() to 
> remove it:
>
>> print fileContents[0].rstrip() + "Hi!"
>
Thanks a lot! This really helps.
Joseph


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to