printing something without a newline OR a space after it?

Phil Frost indigo at bitglue.com
Thu Jun 3 09:32:02 EDT 2004


import sys
sys.stdout.write( 'stuff here' )
sys.stdout.write( 'more' )

On Thu, Jun 03, 2004 at 02:23:01PM +0100, Alex Hunsley wrote:
> Very very simple problem here, can't find out how to do it...
> 
> I want to print something without a new line after it, so I can later 
> output something right after it on the same line.
> 
> If I do:
> 
>   print "stuff here",
>   print "more"
> 
> .. it doesn't output a newline, but it does output a space:
> 
>   stuff here, more
> 
> .. whereas I want no newline and no space:
> 
> 
>   stuff here,more
> 
> How is this done?
> 
> thanks
> alex




More information about the Python-list mailing list