Discussion:
[Tutor] query
Vishakh Rameshan
2015-04-30 23:44:41 UTC
Permalink
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"
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Peter Otten
2015-05-01 08:18:02 UTC
Permalink
Post by Vishakh Rameshan
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.

_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Loading...