当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- C语言I博客作业03
- swiper 窗口宽度变化,页面宽度高度变化 导致自动滑动 解决方案
- 数据科学面试应关注的6个要点
- Get tree menu list
- Astra: the future of Apache Cassandra is cloud native
- Macquarie Bank drives digital transformation with datastex enterprise (DSE)
- 鼠标变小手
- Qt混合Python开发技术:Python介绍、混合过程和Demo
- 你的主机中的软件中止了一个已建立的连接。解决方法
- The road of cloud computing: a free AWS cloud server
猜你喜欢
C语言I博客作业03
解决RabbitMQ消息丢失与重复消费问题
QT hybrid Python development technology: Python introduction, hybrid process and demo
0.计算机简史
来自不同行业领域的50多个对象检测数据集
Improvement of rate limit for laravel8 update
sed之查找替换
Ulab 1.0.0 release
Unparseable date: 'Mon Aug 15 11:24:39 CST 2016',时间格式转换异常
2020天翼智能生态博览会中国电信宣布5G SA正式规模商用
随机推荐
Unparseable date: 'mon Aug 15 11:24:39 CST 2016', time format conversion exception
More than 50 object detection datasets from different industries
Littlest jupyterhub| 02 using nbgitpuller to distribute shared files
Mouse small hand
Oschina plays on Sunday - before that, I always thought I was a
Astra: the future of Apache Cassandra is cloud native
Solve the problem of rabbitmq message loss and repeated consumption
UCGUI简介
什么你的电脑太渣?这几招包你搞定! (Win10优化教程)
分布式共识机制
Qt混合Python开发技术:Python介绍、混合过程和Demo
CPP (4) boost installation and basic use for Mac
1. In depth istio: how is sidecar auto injection realized?
1.深入Istio:Sidecar自动注入如何实现的?
These core technology of object-oriented, after you master it, you can have a good interview
What? Your computer is too bad? You can handle these moves! (win10 optimization tutorial)
Cryptography - Shangsi Valley
5g + Ar out of the circle, China Mobile Migu becomes the whole process strategic partner of the 33rd China Film Golden Rooster Award
Search and replace of sed
Hand tearing algorithm - handwritten singleton mode