为什么我的这个输出结果是零,求大神解释
def square_of_sum(L):
L = []
for x in L:
y = x * x
L.append(y)
return sum(L)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
def square_of_sum(L):
L = []
for x in L:
y = x * x
L.append(y)
return sum(L)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2017-06-04
举报