累加求和的输出
for x in range(5):依次取到的下标
0
1
2
3
4
x
运行程序,填写结果。
total = 0
for x in [1, 2, 3]:
total = total + x
print(total)
for x in range(5):依次取到的下标
运行程序,填写结果。
total = 0
for x in [1, 2, 3]:
total = total + x
print(total)