continue语句及小案例

# coding:utf-8

# 打印1到10之间的整数,不要把5打印出来

# index = 0
# while index < 10:
# 	index += 1
# 	if index ==5:
# 		continue     #退出此次循环
# 	print(index)


# 打印1-10之间的所有奇数

# index = 0
# while index < 10:
# 	index += 1
# 	if index % 2 ==0:
# 		continue
# 	print(index)
# 结果如下
# 1
# 3
# 5
# 7
# 9
原文地址:https://www.cnblogs.com/lsswudi/p/11142053.html