[Tutor] Remove last newline only in print / open / read function

Chris ch2009 at arcor.de
Mon Apr 28 19:29:56 CEST 2014


On 04/25/2014 12:14 PM, Dave Angel wrote:
> print adds a newline.  Use write () instead. 
>          sys.stdout.write (open (name).read ())

The comma at the end of the line didn't change anything, but the write
method worked! Thank you!

-- 
Chris


More information about the Tutor mailing list