i = 0#赋给i变量的初始值0
numbers = []#列表number是空值
while i < 6:#i是小于6的
print("At the top i is %d"%i)#%d时整型数字站位符,打印输出列表元素的第几元素0,1,2,3,4,5,
numbers.append(i)#给列表i增加元素
i = i + 1#给列表的元素加一,变了加一到第6个元素5结束
print("Numbers now:",numbers)#打印出变化的列表,第一个列表[0],第二个列表[0,1]第三个列表[0,1,2][0,1,2,3][0,1,2,3,4]
print("At the bottom i is %d"%i)#%d时整型数字站位符,打印输出列表元素的编号第几元素1,2,3,4,5,6
#print("the numbers:")#字符串原样打印输出
#for num in numbers:#把number赋值给num
# print(num)#打印输出num
打印输出列表元素的第几元素0,1,2,3,4,5
打印出变化的列表,第一个列表[0],第二个列表[0,1]第三个列表[0,1,2][0,1,2,3][0,1,2,3,4]
打印输出列表元素的编号第几元素1,2,3,4,5,6
D:\软件\py36\python.exe E:\python\day15\31\xiti33.py
At the top i is 0#列表里第一个元素0
Numbers now: [0]#第一个列表
At the bottom i is 1#第一个编号1
At the top i is 1
Numbers now: [0, 1]
At the bottom i is 2
At the top i is 2
Numbers now: [0, 1, 2]
At the bottom i is 3
At the top i is 3
Numbers now: [0, 1, 2, 3]
At the bottom i is 4
At the top i is 4
Numbers now: [0, 1, 2, 3, 4]
At the bottom i is 5
At the top i is 5
Numbers now: [0, 1, 2, 3, 4, 5]
At the bottom i is 6
进程已结束,退出代码0