n=5
while n>0:
n=n-1
if n<2:
break
print(n)
else:
print("end")
4
3
2
n=5
while n>0:
n=n-1
if n<2:
continue
print(n)
else:
print("end")
4
3
2
end
循环语句中break,continue的区别
最新推荐文章于 2024-11-09 21:51:27 发布