On Sun, Dec 22, 2013 at 11:14 AM, Steven D'Aprano <[email protected]> wrote:
> That's the answer to your question: in Python 2, print is a statement,
> not a function. That has many consequences, but the relevant one is that
> statements don't require brackets (parentheses for Americans reading)
> around the arguments.

If Python 3 compatibility is needed/desired, one can do

from __future__ import print_function

in order to make Python 2 operate like Python 3.

> (It is commas, not parentheses, which create tuples.)

…unless you want an empty tuple, in which case it’s just () — without
any commas whatsoever.

-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to