请教大神,报以下错误,是什么原因?
>>> def prod(x,y):
... return x*y
... print reduce(prod,[2,4,5,7,12])
File "<stdin>", line 3
print reduce(prod,[2,4,5,7,12])
^
SyntaxError: invalid syntax
>>>
>>> def prod(x,y):
... return x*y
... print reduce(prod,[2,4,5,7,12])
File "<stdin>", line 3
print reduce(prod,[2,4,5,7,12])
^
SyntaxError: invalid syntax
>>>
2016-07-13
举报