为什么在python报错?
>>> def square_of_sum(L):
sum = 0
for x in L:
sum = sum+x*x
return sum
>>> print square_of_sum([1,2])
SyntaxError: invalid syntax
>>> def square_of_sum(L):
sum = 0
for x in L:
sum = sum+x*x
return sum
>>> print square_of_sum([1,2])
SyntaxError: invalid syntax
2018-03-14
举报