[Tutor] query

Peter Otten __peter__ at web.de
Fri May 1 10:18:02 CEST 2015


Vishakh Rameshan wrote:

> i have downloaded and installed python 3.4.3
> and when i just type print "with message to display" it shows missing
> paranthesis error
> but what i have learnt is that inorder to display message onle print
> command and message in "msg"

In Python 2 you would write

print "hello"

but in Python 3 print is no longer a statement, it has become a function. As 
with every other function parentheses are required to invoke it:

print("hello")

There are other subtle changes in Python 3, so you might want to read the 
tutorial at <https://docs.python.org/3.4/tutorial/index.html> or any other 
introductory text specifically targeting Python 3.



More information about the Tutor mailing list