How avoid both a newline and a space between 2 print commands?

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Jan 23 16:35:07 EST 2008


"seberino at spawar.navy.mil" <seberino at spawar.navy.mil> writes:

> On Jan 23, 6:12 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> 
> > sys.stdout.write("foo")
> > sys.stdout.write("bar")
> 
> Diez
> 
> Thanks. Beautiful!  I <3 Python!

Even better, this form will survive unchanged into Python 3, whereas
the 'print' statement will undergo some changes in syntax and
perhaps semantics.

-- 
 \       "Free thought is a necessary, but not a sufficient, condition |
  `\                                       for democracy." —Carl Sagan |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list