sum=0 for i in range(1,1): sum= sum +i print(sum)
结果为0
sum=0 for i in range(1,2): sum= sum +i print(sum)
结果为1
如果要枚举1到100,for 循环应该是 range(1,101)