Python3.x Run Python2.x Codes syntax error: “Missing parentheses in call to ‘print’

#Another type of error
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(

The format of the code is as follows:

print "File %s not exist" % filename
。。。
print '-------xxx------'

change to 
print ("File %s not exist" % filename)
print ('-------xxx------')

Link: https://stackoverflow.com/questions/41341149/python-3-6-0-syntax-error-missing-parentheses-in-call-to-print?noredirect=1&lq=1

Similar Posts: