为什么 这里地sum不会被当作某种关键字或者函数,在写的时候sum已经高亮显示了
def square_of_sum(L): sum = 0 for x in L: sum+= x*x return sumprint square_of_sum([1, 2, 3, 4, 5])print square_of_sum([-5, 0, 5, 15, 25])
def square_of_sum(L): sum = 0 for x in L: sum+= x*x return sumprint square_of_sum([1, 2, 3, 4, 5])print square_of_sum([-5, 0, 5, 15, 25])
2019-05-18
举报