What is print? A function?

Sion Arrowsmith siona at chiark.greenend.org.uk
Mon Jan 24 10:05:16 EST 2005


Michael Hoffman  <cam.ac.uk at mh391.invalid> wrote:
>Frans Englich wrote:
>> Nah, I don't think it's a function, but rather a builtin "statement". But it's 
>> possible to invoke it as an function; print( "test" ) works fine.
>That is not invoking it as a function. The parentheses are only for 
>ordering the expression on the right
>
>You can do this too:
>
> >>> print("abc"),("def"),("ghi")
>abc def ghi

And for further enlightenment:

.>>> print("abc", "def", "ghi")
('abc', 'def', 'ghi')

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list