Author:HU YUE
#break结束整个循环,退出循环
#continue跳出本次循环
for i in range(0,10,2): #2是步长
print("wo")
for i in range(10):
print(i)
for j in range(10):
print(j)
if j>5:
break
s=input("输入:")
i=5
for j in range (0,10,1):
if i==j:
print("i等于j了", i, j)
continue
else:
print("i不等于j",i,j)
原文地址:http://blog.51cto.com/12992048/2172799
时间: 2024-11-10 13:20:49