About printing in IDLE?

Terry Reedy tjreedy at udel.edu
Fri Mar 10 05:06:07 CET 2006


"Dr. Pastor" <elpX at adsihqX.com> wrote in message 
news:rh3Qf.3303$Bj7.2296 at newsread2.news.pas.earthlink.net...
> Installed Python 2.4.2 on Windows XP.
> Activated IDLE.
> Loaded the following to the Edit window:
> ---
> print "hello world"
> for i in range(10):
>         print i,
>
> print "Done"
> ---
> It prints as: 0 1 2 3 4 5 6 7 8 9 Done

I would put a bare print statement immediately after the loop to finish the 
loop output, and maybe add a comment to that effect.

print # finish line generated by loop above

  I would not leave the line hanging until something else is printed, nor 
fiddle with making last line of loop different.

Terry Jan Reedy






More information about the Python-list mailing list