当前位置:网站首页>Python loop distinction (while loop and for loop)
Python loop distinction (while loop and for loop)
2020-11-08 08:04:00 【osc_mfth2zpa】
Applicability
while loop , For cycles with unknown number of cycles ;
for loop , For cycles with known number of cycles ;
Explain in detail
1、【 The number of cycles is basically known 】for Suitable for traversing data , The data traversal ends when there is no data ;
2、【 The number of cycles is basically unknown , End the loop by judging the inverse of the condition 】while Before circulation , We need to judge the conditions , It is relatively suitable for loops with complicated logic ;
remarks :while Circulation and for loop , Part of it can be switched between the two !!!
explain
1、 I wrote... For the first time CSDN Blog , I hope you all support !
2、 I am 6 Years of testing industry experience ,3 Years of black box testing experience ,3 Years of test development experience , He once worked in a large-scale artificial intelligence listed company in China , Proficient in performance testing , automated testing , The interface test , Artificial intelligence AI Voice test ;
3、 The following is my internal communication group , You are welcome to join us , Let's communicate together !
版权声明
本文为[osc_mfth2zpa]所创,转载请带上原文链接,感谢
边栏推荐
- Cryptography - Shangsi Valley
- leetcode之判断路径是否相交
- Judging whether paths intersect or not by leetcode
- NOIP 2012 提高组 复赛 第一天 第二题 国王游戏 game 数学推导 AC代码(高精度 低精度 乘 除 比较)+60代码(long long)+20分代码(全排列+深搜dfs)
- 【总结系列】互联网服务端技术体系:高性能之数据库索引
- ulab 1.0.0发布
- C language I blog assignment 03
- Python3.9的7个特性
- CPP (2) creating CPP project
- Visual Studio 2015 未响应/已停止工作的问题解决
猜你喜欢
随机推荐
2020天翼智能生态博览会中国电信宣布5G SA正式规模商用
Cryptography - Shangsi Valley
高并发,你真的理解透彻了吗?
Get tree menu list
0.计算机简史
PerconaXtraDBCluster8.0 最详尽用法指南
leetcode之判断路径是否相交
iOS 学习笔记二【cocopods安装使用和安装过程中遇到的问题及解决办法】【20160725更新】
LadonGo开源全平台渗透扫描器框架
Bili Bili common API
Adobe Prelude /Pl 2020软件安装包(附安装教程)
Six key points of data science interview
16. File transfer protocol, vsftpd service
Android Basics - RadioButton (radio button)
iOS上传App Store报错:this action cannot be completed -22421 解决方案
QT hybrid Python development technology: Python introduction, hybrid process and demo
Basic knowledge of C + +
Astra: the future of Apache Cassandra is cloud native
双向LSTM在时间序列异常值检测的应用
面部识别:攻击类型和反欺骗技术