[Solved] How to print in the Python programming language [duplicate]


Consider:

print "hello world"

The above statement is OK when you are using Python 2.x, because in Python 2.x, print is a statement.

But in Python 3.x, print is a function and there is no way to turn it back into a statement. So you must use parentheses.

So for Python 3.x, the answer is:

print("hello world")

Please refer to: Print Is A Function.

solved How to print in the Python programming language [duplicate]