当前位置:网站首页>第一章 第十二节:break,continue的使用
第一章 第十二节:break,continue的使用
2022-07-20 10:10:00 【中亿丰数字科技有限公司】
Python基础入门(全套保姆级教程)
第一章
第十二节:break,continue的使用
break: 让当前这个循环立即停止。
while True:
content = input("请输入你要喷的内容(q结束喷人):")
if content == "q": # == 表示判断左右两端是否一致
break # 结束循环
print("发送给下路:", content)
continue: 停止当前本次循环. 继续执行下一次循环
i = 1
while i <= 10:
if i == 4:
i = i + 1
continue # 终止当前本次循环. 继续执行下一次循环
print(i)
i = i + 1
边栏推荐
- Wireless channel measurement and modeling of 10 GHz indoor wireless body area network
- 遥感影像分类工具和webgis的可视化应用
- Implementation of form control adaptation (adaptive form) layout in WinForm_ By C code
- ASP.NET Core 6框架揭秘实例演示[01]: 编程初体验
- Jenkins首次安装选择推荐插件时出现“: No such plugin: cloudbees-folder” 解决方案
- 提取excel表头
- DNA助力破解30年前悬案,嫌疑人或因爱上室友而勒死其女友,被捕时已是科技公司CEO...
- 语雀—好用的文档编写、知识沉淀的工具
- Redis list type
- Le point d'interrogation est en place! Yu Jingchuan 2013 Best think "China Space Station", stars of the Sea to navigate!...
猜你喜欢
[问题已处理]-jenkins传统打包交付流程优化
LeetCode简单题之滑动窗口的平均值
幼儿园核酸预约登记小程序实战开发(下篇)
项目启动端口被占用的解决办法
Redis hash type
Kettle [practice 05] four methods, applicable scenarios and advantages and disadvantages analysis of kettle processing JSON format data (cloud resource sharing: JSON data +ktr)
Le point d'interrogation est en place! Yu Jingchuan 2013 Best think "China Space Station", stars of the Sea to navigate!...
win10开机启动ps1脚本
Kettle [practice 03] details of difficulties in classification, analysis and warehousing of KML type files in Shuijing micrograph (complete process example cloud resource sharing: including sql+kjb+kt
UE4(unreal engine4)地形编辑工具中的无法显示样条线
随机推荐
一个短信验证码功能引发的总结思考[通俗易懂]
巴比特 | 元宇宙每日必读:迪拜推出国家元宇宙战略,计划在未来五年内将元宇宙相关公司数量翻 5 倍,支持4万个虚拟工作岗位...
[hdlbits skimming] Verilog language -- basics
仍旧是同步问题
数商云:如何实现供应商SRM管理系统的应用价值?
爱普生发票打印机 每次连续打印发票,都跳页,中间一张空白
Kudu1.11 environmental installation
Redis string type
知识点滴 - 有关剧本的网站
【u-boot】u-boot运行主线分析【01】—_main
codeforces:D1. Chopping Carrots (Easy Version)【最大最小值问题 + 控制一边让另一边尽量靠近 + 思维】
自定义持久层框架MyORMFramework(三)—框架实现
幼儿园核酸预约登记小程序实战开发(下篇)
node卸载
Qt | QWidget的一些总结
边云协同场景下基于强化学习的精英分层任务卸载策略研究
vs2019配置Qt5开发环境
LeetCode简单题之环形链表
NepCTF
Redis data structure & General Command