else语句
来源:互联网 发布:淘宝客如何设置优惠券 编辑:程序博客网 时间:2024/04/30 15:59
1.if else
so easy~
2.elif
分支
3.for else / while else
求最大约数
def showMaxFactor(num): count=num/2 while count>1: if num%count==0: print "largest factor of %d is %d" %(num, count) break count-=1 else: print num, " is prime"if __name__=="__main__": for i in xrange(10,21): showMaxFactor(i)
4.try else
同上面,只有for,while或者try在没有break或者异常情况下,才会进入else语句
0 0
- else语句
- IF-ELSE IF-ELSE语句
- Delphi if else 语句
- if~else 语句再认识
- if else 语句
- JavaScript If...Else 语句
- 笔记(六)else语句
- PHP If...Else 语句
- PHP If...Else 语句
- if-else语句
- JavaScript If...Else 语句
- JavaScript If...Else 语句
- JAVA If-else语句
- if...else... 语句
- sql if else 语句
- if-else语句注意事项
- Python 中的else语句
- 010 else -if 语句
- 你根本不会休息 ----最好的休息,是让你重燃生活的热情。
- storm local版本本地测试异常汇总
- openfire 集群原理说明
- EasyUI form ajax submit后,在IE下提示下载内容的解决办法
- Linux 下编译Android-VLC开源播放器详解
- else语句
- android 4.4的耳机插入检测流程
- 设计模式六大原则(1):单一职责原则
- 【UGUI】Interaction Components
- mac下sips的用法
- android Sensor一些手机感应效果
- Win7 Jekyll安装(使用64位)
- ubuntu 安装svn及svn使用指南
- Java监视系统剪贴板