“Python/gloss python for continue”的版本间差异

来自菜鸟教程
跳转至:导航、​搜索
(Pywikibot 4.4.0.dev0)
 
(机器人:添加分类Python基础教程
 
第46行: 第46行:
 
</div>
 
</div>
 
<br />
 
<br />
 +
 +
[[分类:Python基础教程]]

2020年10月29日 (四) 08:48的最新版本

<languages />

Python继续循环

继续声明

随着 继续 语句,我们可以停止循环的当前迭代,然后继续下一个:

不要打印香蕉:

  fruits = ["apple", "banana", "cherry"]
for x in fruits:
  if x == 
  "banana":
    continue
  print(x)