[Tutor] Simple PassGen

Alan Gauld alan.gauld at btinternet.com
Tue Feb 10 01:45:01 CET 2009


"Marc Tompkins" <marc.tompkins at gmail.com> wrote

> Don't forget - the "print" statement is going away in 3.0, and you 
> really
> should get into the habit of using the print() function instead for 
> new
> code.  IIRC, print() does NOT support suppressing the newline,

>From the v3 Whats New document:

Old: print x,           # Trailing comma suppresses newline
New: print(x, end=" ")  # Appends a space instead of a newline

Presumably you could use "" instead of " " to eliminate the space....

>>> for n in range(4):
...    print(n, end="")
...
0123>>>

Yes, it does...



HTH,

Alan G.
My first answer on a Python v3 issue! :-) 




More information about the Tutor mailing list