Re: HOw does one print without a c/r ?

Guido van Rossum (Guido.van.Rossum@cwi.nl)
Thu, 02 Jul 1992 16:41:25 +0200

>Is it possible to print something but not automatically have a
>carriage return appended to it ?

Yes, append a comma after the last argument to print. For instance,
this loop prints the numbers 0..9 on a line separated by spaces. Note
the parameterless "print" that adds the final newline:

>>> for i in range(10):
... print i,
... else:
... print
...
0 1 2 3 4 5 6 7 8 9
>>>

--Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
"Is it a bird? No! Is it a plane? No! It's bicycle repair man!"