答案代码有疑问
参考答案:
def square_of_sum(L): sum = 0 for x in L: sum = sum + x * x return sum print(square_of_sum([1, 2, 3, 4, 5])) print(square_of_sum([-5, 0, 5, 15, 25]))
最后的
print(square_of_sum([1, 2, 3, 4, 5]))
为什么要用[] 把 12345 []起来?????
参考答案:
def square_of_sum(L): sum = 0 for x in L: sum = sum + x * x return sum print(square_of_sum([1, 2, 3, 4, 5])) print(square_of_sum([-5, 0, 5, 15, 25]))
最后的
print(square_of_sum([1, 2, 3, 4, 5]))
为什么要用[] 把 12345 []起来?????
2021-08-02
举报