# Auther: Aaron Fan

#要返回到循环开头,并根据条件测试结果决定是否继续执行循环,可使用continue
#执行continue语句,让python忽略余下的代码

#只打印1到10之间的奇数:
i = 0
while i < 10:
i += 1
#如果与2的余数为0,那么忽略余下的代码
if i % 2 == 0:
continue

print(i)

相关文章:

  • 2021-07-05
  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-22
猜你喜欢
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-02-09
  • 2021-11-25
  • 2021-09-28
  • 2022-12-23
相关资源
相似解决方案