求问,为什么这样编写不对呢
def square_of_sum(L):
F = []
for i in L:
a = i*i
F.append(a)
return sum(F)
print(square_of_sum([1, 2, 3, 4, 5]))
def square_of_sum(L):
F = []
for i in L:
a = i*i
F.append(a)
return sum(F)
print(square_of_sum([1, 2, 3, 4, 5]))
2020-03-13
举报