\
while
index = 1#索引定义 while index <= 100: print("hello,world!!")
index += 1
break
index = 1
while index <= 100:
if index == 50: break print(index) index +=1
while else
index = 1while index <= 100: index +=1 if index == 50: break print(index) else: print(“简环正常结束了”)
循环
i=1
while i <= 7:print(f"今天是送花的第{i}天") j=1 while j <= 10: print(f"这是送的第j}朵") j+=1 i =1
for
list_01 = [1,2314]
index =0
while index < len(list_01):
print(list_01[index])
index += 1 set_01 = (11213)
for:选代容器中的每一个元素
for 临时变量”in 数据容器:代码块
range
range(start,end,step):生成一系列还续的整数
range(num):(0-num)range(start,end)