这样怎么样
def square_of_sum(L):
return sum([x*x for x in L])
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
def square_of_sum(L):
return sum([x*x for x in L])
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2015-05-06
举报