Roy Smith wrote: > > 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)) here is the output of my machine: >>> import sys >>> for i in range(3): ... sys.stdout.write(str(i)) ... 012>>> Why the prompt followed after the output? Maybe it's not as expected.