Python学习笔记(十二)----Python continue 语句
来源:互联网 发布:java培训哪个机构好 编辑:程序博客网 时间:2024/06/15 16:48
Python continue 语句跳出本次循环,而break跳出整个循环。continue 语句用来告诉Python跳过当前循环的剩余语句,然后继续进行下一轮循环。
continue语句用在while和for循环中。
一、Python 语言 continue 语句语法格式
continue
二、流程图
三、实例
#!/usr/bin/pythonfor letter in 'Python': # First Example if letter == 'h': continue print 'Current Letter :', lettervar = 10 # Second Examplewhile var > 0: var = var -1 if var == 5: continue print 'Current variable value :', varprint "Good bye!"以上实例执行结果:
Current Letter : PCurrent Letter : yCurrent Letter : tCurrent Letter : oCurrent Letter : nCurrent variable value : 9Current variable value : 8Current variable value : 7Current variable value : 6Current variable value : 4Current variable value : 3Current variable value : 2Current variable value : 1Current variable value : 0Good bye!
0 0
- Python学习笔记(十二)----Python continue 语句
- Python学习笔记(continue语句)
- python 学习(九) 之 continue语句
- python 学习笔记(十二)
- Python学习笔记(十二)
- Python笔记(十二)--循环控制语句
- Python学习笔记(十二)-- Python模块
- python 学习while语句中的break&continue
- python 学习笔记(二十二)
- python------continue语句
- Python continue语句用法
- Python continue 语句
- Python菜鸟--continue 语句
- Python continue 语句
- Python continue 语句
- Python continue 语句
- Python continue 语句
- python中continue语句
- 内核调试函数printk()
- linux中可重入函数 sig_automaic
- 推荐一些C#相关的网站、资源和书籍
- rebuild table online
- broadcast,broadcastReceiver
- Python学习笔记(十二)----Python continue 语句
- asp.net mvc 3.0详细笔记__03__项目文件结构详解_Controllers
- 辽宁警察错抓黑龙江官员后登门道歉并赔偿1.5万
- Chapter 6. MATLAB数值计算基础
- 动态规划之背包问题
- Java EE HTML5 WebSocket 编码器与解码器的例子
- html5中页面拨打电话的方式
- 烧写uboot到nand中
- Excel中设置下拉列表项