Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "Harshit"
SyntaxError: invalid syntax
Where is the problem here?
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "Harshit"
SyntaxError: invalid syntax
Where is the problem here?
You are trying to use Python 2.x syntax in Python 3.x.
In Python 3.x, print
is no longer a statement. Instead, it was converted into function and therefore must now be called like one:
>>> print("hi") # Note the parenthesis
hi
>>>