到底哪里出错了
def prod(x,y):
... return x*y
... print reduce(prod,[2,5,7,12])
File "<stdin>", line 3
print reduce(prod,[2,5,7,12])
^
SyntaxError: invalid syntax
>>>
def prod(x,y):
... return x*y
... print reduce(prod,[2,5,7,12])
File "<stdin>", line 3
print reduce(prod,[2,5,7,12])
^
SyntaxError: invalid syntax
>>>
2018-03-13
举报