print without newline?

Ian Hobson ian.hobson at ntlworld.com
Fri Sep 1 20:09:35 EDT 2000


In article <8FA075496duncanrcpcouk at 194.238.50.13>, Duncan Booth
<duncan at rcp.co.uk> writes
>noahspurrier at my-deja.com wrote in <8oi8ur$co4$1 at nnrp1.deja.com>:
>
>>Is there a way to print without the newline (carriage return
>>or line feed)? This does not do what I want:
>>        print "Hello.",
>>because it puts a space after the "Hello."
>
>Actually, it doesn't put a space after the "Hello.", the next print 
>statement puts a space before its output.

I'm sure there is logic behind this choice, but it escapes me. 

Can anyone explain why print should put a space out first? 

And can they confirm that the FIRST print in the program does not. 

Thanks

Ian

Ian Hobson 

Every time we teach a child something, we prevent him from inventing 
it himself. - Jean Piaget



More information about the Python-list mailing list