请大神解答
L = [] x = 1 sum = 0 while x <= 100: L.append(x * x) sum = sum+L[x-1] x = x + 1 print sum 不知道为什么用pycharm编译直接print sum(L)会报错
L = [] x = 1 sum = 0 while x <= 100: L.append(x * x) sum = sum+L[x-1] x = x + 1 print sum 不知道为什么用pycharm编译直接print sum(L)会报错
2017-04-14
举报