我觉得这样写比较简便
def square_of_sum(L):
x = 0
while x < len(L):
L[x] = L[x] * L[x]
x = x+1
return sum(L)
def square_of_sum(L):
x = 0
while x < len(L):
L[x] = L[x] * L[x]
x = x+1
return sum(L)
2020-04-24
举报