当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Abnormal + Abstract
- More than 50 object detection datasets from different industries
- Android 9.0/P WebView 多进程使用的问题
- Lay UI left tree Dtree right list table
- CPP (1) installation of cmake
- 【总结系列】互联网服务端技术体系:高性能之数据库索引
- Fortify漏洞之 Privacy Violation(隐私泄露)和 Null Dereference(空指针异常)
- Is blazor ready to serve the enterprise?
- The software in your host has terminated an established connection. resolvent
- QT hybrid Python development technology: Python introduction, hybrid process and demo
猜你喜欢
随机推荐
Littlest JupyterHub| 02 使用nbgitpuller分发共享文件
C语言I博客作业03
Lay UI left tree Dtree right list table
CPP (1) installation of cmake
C / C + + Programming Notes: what are the advantages of C compared with other programming languages?
Android 9.0/P WebView 多进程使用的问题
学习Scala IF…ELSE 语句
Blazor 准备好为企业服务了吗?
Goland 编写含有template的程序
什么你的电脑太渣?这几招包你搞定! (Win10优化教程)
Golang anonymous structure member, named structure member, inheritance, composition
Unparseable date: 'mon Aug 15 11:24:39 CST 2016', time format conversion exception
Game mathematical derivation AC code (high precision and low precision multiplication and division comparison) + 60 code (long long) + 20 point code (Full Permutation + deep search DFS)
LadonGo开源全平台渗透扫描器框架
Seven features of Python 3.9
wanxin金融
Sum up some useful functions
The real-time display of CPU and memory utilization rate by Ubuntu
5G+AR出圈,中国移动咪咕成第33届中国电影金鸡奖全程战略合作伙伴
Wanxin Finance