Not really. With the function you must do print(stuff)
, but with the statement you can do print stuff
.
The main advantage is that, if print
is a function, you can assign a different function to that name. For instance, you could create a new function that not only outputs the data to the screen but also logs it to a file. If you assign this function to the builtin print
, then any code that uses print
will automatically log to a file. This is not possible with print
as a statement, and you must resort to other techniques to get the same effect.
There are also some smaller changes associated with the way print
formats its output. The statement used "magic" syntax (e.g., a trailing comma suppressed a following space), while the function uses standard keyword-argument conventions.
Also, print
is always a function in Python 3. It's in Python 2 that you must use the __future__
import if you want print
as a function.