标签:int for循环 str one 循环 while -- nbsp 结束
for i in range(10): if i >= 5: print(i) else: #break 跳出本层循环 continue #跳出本次循环 print("-----")
for i in range(10): print(i) if i== 5: break else: #当循环正常结束时,走else print("done")
count = 0 while True: print("你是风儿我是沙,缠缠绵绵到天涯...",count) count +=1 if count == 100: break
for i in range(3): for j in range(3): if i==j==1: break else: print(i,j) else: continue break
,,,
结果为
0 0
0 1
0 2
1 0
‘‘‘
标签:int for循环 str one 循环 while -- nbsp 结束
原文地址:http://www.cnblogs.com/domestique/p/6748612.html