I'm getting a SyntaxError: invalid syntax in response to the following code when I run in it IDLE, but not in PythonTutor. Can anyone help with why?
def apples(x, y):
try:
result = x/y
except ZeroDivisionError, e:
print "division by zero!" + str(e)
else:
print "result is", result
finally:
print "executing finally clause"
apples(3, 4)
The SyntaxError is associated with the 'apples' in apples(3,4)