Print Hello World syntax error

running simple attached script example produces syntax error here … why?
HelloWorld2.toe (3.81 KB)

got it:

Python 3 changed print to a function, so it has to be enclosed in parentheses.

stackoverflow.com/questions/4685 … -of-prints

print (‘hello, world’)

(just leaving breadcrumbs for myself and others…)

If you write print() function in a program and someone using Python 2.x tries to run it, they will get an error. To avoid this, it is a good practice to import print function :

from __future__ import print_function

The from future import print_function ; to bring the print function from Python 3 into Python 2.x. Now your code works on both Python 2.x and Python 3.x . The future statements need to be near the top of the file because they change fundamental things about the language, and so the compiler needs to know about them from the beginning.