为什么不能倒换顺序
L = [] x=1 while x<=100: x=x+1 L.append(x*x) print sum(L) 输出的结果跟 L = [] x=1 while x<=100: x=x+1 L.append(x*x) print sum(L) 输出的结果跟 L = [] x=1 while x<=100: L.append(x*x) x=x+1 print sum(L) 是不一样的
L = [] x=1 while x<=100: x=x+1 L.append(x*x) print sum(L) 输出的结果跟 L = [] x=1 while x<=100: x=x+1 L.append(x*x) print sum(L) 输出的结果跟 L = [] x=1 while x<=100: L.append(x*x) x=x+1 print sum(L) 是不一样的
2017-12-28
举报