python3.x 简单的for语句循环案例
来源:互联网 发布:linux安装hba卡驱动 编辑:程序博客网 时间:2024/06/18 18:51
python简单完成一个for循环并且使用break及continue并查看其效果
#!/usr/bin/env python# Auther by wqfor i in range(0,10): if i <5: print("loop",i) else: continue #跳出本次循环进入下一个循环 print("hehe...")print("jump out this recycle")for i in range(10): print('--------------',i) for j in range(10): print(j) if j >5: break#跳出本小循环
输出结果:
loop 0hehe...loop 1hehe...loop 2hehe...loop 3hehe...loop 4hehe...jump out this cycle-------------- 00123456-------------- 10123456-------------- 20123456-------------- 30123456-------------- 40123456-------------- 50123456-------------- 60123456-------------- 70123456-------------- 80123456-------------- 90123456Process finished with exit code 0
阅读全文
0 0
- python3.x 简单的for语句循环案例
- python3 for 循环中的 else 语句
- for语句的循环
- 一个简单的双重for循环的汇编语句解释
- 简单的循环语句
- 简单的for循环
- Python3.X中的循环
- Python3-while循环语句
- python013 Python3 循环语句
- Python3 循环语句
- 简单使用序列for循环语句
- for循环语句的bug?
- 增强的for循环语句
- 增强的for循环语句
- 增强的for循环语句
- JAVA 的 for 循环语句
- for循环语句的使用
- python3 for循环
- 理解JavaScript的async/await
- 1072. 开学寄语(20)
- Error while executing: am start -n "" -a android.intent.action.MAIN -c android.intent.category.LAUNC
- 微信免充值
- 深入浅出JMS(三)--ActiveMQ简单的HelloWorld实例
- python3.x 简单的for语句循环案例
- MySQL下载相关问题
- Python 正则表达式入门(初级篇)
- 6-13 Percolate Up and Down(20 point(s))
- CSDN下载资源再评论不返积分2017-11-8 11:00
- IOS UITableView 顶部有空白
- 构造、析构、无参构造、拷贝构造说明
- 初中生高中生怎么自学动漫画漫画
- jia cheng fang