Python Forum

Full Version: Why does function print require bracket for text?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I've just started to learn Python from the book "Python from beginning" Peter Norton.
In chapter 1 I learnt about using function print and it uses quatation marks for text but I try to do it practically I get an error that function print require brackets.
I use Python IDE editor version 3.6
(May-23-2018, 05:34 PM)richardm55 Wrote: [ -> ]I get an error that function print require brackets.

What version of python is the book written for? In python 2.x, print "some words" was valid, but in python 3.x that is now a syntax error, and should be written as print("some words")
just to add that you should stick to python 3.6 and [maybe] find a book that is not targeted at python2