当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
Daily challenges of search engines_ 4_ External heterogeneous resources - Zhihu
Learn Scala if Else statement
C / C + + Programming Notes: what are the advantages of C compared with other programming languages?
个人短网址生成平台 自定义域名、开启防红、统计访问量
What details does C + + improve on the basis of C
Qt混合Python开发技术:Python介绍、混合过程和Demo
麦格理银行借助DataStax Enterprise (DSE) 驱动数字化转型
微信昵称emoji表情,特殊表情导致列表不显示,导出EXCEL报错等问题解决!
About the promotion of the whole stack of engineers, from the introduction to give up the secret arts, do not click in to have a look?
Android 9.0/P WebView 多进程使用的问题
随机推荐
Go sending pin and email
Experience the latest version of erofs on Ubuntu
GoLand writes a program with template
c# 表达式树(一)
面部识别:攻击类型和反欺骗技术
iOS上传App Store报错:this action cannot be completed -22421 解决方案
Littlest JupyterHub| 02 使用nbgitpuller分发共享文件
NOIP 2012 提高组 复赛 第一天 第二题 国王游戏 game 数学推导 AC代码(高精度 低精度 乘 除 比较)+60代码(long long)+20分代码(全排列+深搜dfs)
On the stock trading of leetcode
Summary of knowledge points of Jingtao project
Interface
Blazor 准备好为企业服务了吗?
Delphi10's rest.json And system.json Step on the pit
Basic operation of database
M-end software product design considerations - Zhihu
[original] about the abnormal situation of high version poi autosizecolumn method
哔哩哔哩常用api
异常+abstract
Everything is 2020, LINQ query you are still using expression tree
GET,POST,PUT,DELETE,OPTIONS用法与说明