ProAnswers.org

What is 'print' in Python?

What is ‘print’ in Python?
Isn’t print a function?

In 2.7 and down, print is a statement. In python 3, print is a function. To use the print function in Python 2.6 or 2.7, you can do

[~/repo/py] |4>from future import print_function

[~/repo/py]
|5>print print
–>print(print)