No newline using printf

Roy Smith roy at
Fri Sep 16 02:45:50 CEST 2005

In article <1126831050.903747.13040 at>,
 "Samuel" <knipknap at> wrote:
> How can I print a word without appending a newline character? Appending
> a "," to the print statement only substitutes the newline for a space,
> which is not what I am looking for.

For closer control over output, use the write() function.  You want 
something like:

import sys
for i in range(3):
   sys.stdout.write (str(i))

More information about the Python-list mailing list