[Tutor] trailing comma behind print '\n'?

Don Arnold darnold02 at sprynet.com
Wed Nov 12 07:22:34 EST 2003


----- Original Message -----
From: "Eur van Andel" <eur at fiwihex.nl>
To: <tutor at python.org>
Sent: Wednesday, November 12, 2003 5:40 AM
Subject: [Tutor] trailing comma behind print '\n'?


> Hi
>
> Is it correct that print always generates a newline, so that:
>
> print '\n'
>
> will generate two?
>

Correct.


> Undersigned newbie is confused. Should he use
>
> print '\n',
>
> or
>
> print
>
> for generating newlines?
>

Depends on how much you like to type. ; )  A lone 'print' should suffice.

> --
> Ir. E.E. van Andel, Fine Wire Heat Exchangers, Fiwihex B.V.
www.fiwihex.com
> Wierdensestraat 74, NL-7604 BK  Almelo, The Netherlands   eur at fiwihex.nl
> phone +31-546-491106  fax +31-546-491107  mobile +31-653-286573
>

HTH,
Don




More information about the Tutor mailing list