are final newlines appended if output lacks it?
John Machin
sjmachin at lexicon.net
Sat May 3 22:01:48 EDT 2003
On Sun, 04 May 2003 08:53:39 +0800, Dan Jacobson
<jidanni at dman.ddts.net> wrote:
>Doing help() print explains how the blank got in here,
>$ python -c "print 'wow',;print 'pow',"|od -c
>0000000 w o w p o w \n
>0000010
>But not the newline. Why?
>--
>http://jidanni.org/ Taiwan(04)25854780
Doing help() print also explains how the newline got in there:
"""
A "\n" character is written at the end, unless the print statement
ends
with a comma. This is the only action if the statement contains just
the
keyword print.
"""
More information about the Python-list
mailing list