当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- These core technology of object-oriented, after you master it, you can have a good interview
- Macquarie Bank drives digital transformation with datastex enterprise (DSE)
- The road of cloud computing: a free AWS cloud server
- M-end software product design considerations - Zhihu
- C expression tree (1)
- Swiper window width changes, page width height changes lead to automatic sliding solution
- C语言I博客作业03
- nvm
- 学习Scala IF…ELSE 语句
- NOIP 2012 提高组 复赛 第一天 第二题 国王游戏 game 数学推导 AC代码(高精度 低精度 乘 除 比较)+60代码(long long)+20分代码(全排列+深搜dfs)
猜你喜欢
PCR and PTS calculation and inverse operation in TS stream
Idea - the. IML file was not automatically generated by the project
C/C++编程笔记:C语言相比其他编程语言,有什么不一样的优势?
More than 50 object detection datasets from different industries
leetcode之判断路径是否相交
搜索引擎的日常挑战_4_外部异构资源 - 知乎
wanxin金融
麦格理银行借助DataStax Enterprise (DSE) 驱动数字化转型
Problems of Android 9.0/p WebView multi process usage
0.计算机简史
随机推荐
【原创】关于高版本poi autoSizeColumn方法异常的情况
M 端软件产品设计思虑札记 - 知乎
Solve the problem of rabbitmq message loss and repeated consumption
CPP (1) installation of cmake
IOS learning note 2 [problems and solutions encountered during the installation and use of cocopods] [update 20160725]
QT hybrid Python development technology: Python introduction, hybrid process and demo
Oschina plays on Sunday - before that, I always thought I was a
Sum up some useful functions
Speed up your website with jsdelivr
The software in your host has terminated an established connection. resolvent
Android Basics - RadioButton (radio button)
Abnormal + Abstract
Qt混合Python开发技术:Python介绍、混合过程和Demo
Visual studio 2015 unresponsive / stopped working problem resolution
Face recognition: attack types and anti spoofing techniques
Swiper window width changes, page width height changes lead to automatic sliding solution
C language I blog assignment 03
Go sending pin and email
16. File transfer protocol, vsftpd service
IOS upload app store error: this action cannot be completed - 22421 solution