当前位置:网站首页>python 循环区分(while循环和for循环)
python 循环区分(while循环和for循环)
2020-11-08 08:04:00 【osc_mfth2zpa】
适用性
while循环,适用于未知循环次数的循环;
for循环,适用于已知循环次数的循环;
详细解释
1、【循环次数基本可知】for适合遍历数据,数据遍历没有了就结束;
2、【循环次数基本不可知,通过判断条件的反条件来结束循环】while循环前,需要判断条件,相对适合逻辑比较复杂的循环;
备注:while循环和for循环,两者之间部分是可以切换的!!!
说明
1、本人第一次写CSDN博客,希望大家支持!
2、本人6年测试行业经验,3年黑盒测试经验,3年测试开发经验,曾任职国内大型人工智能上市公司,精通性能测试,自动化测试,接口测试,人工智能AI语音测试;
3、如下是本人内部沟通群,欢迎对于测试志同道合的人加入,大家一起沟通交流!
版权声明
本文为[osc_mfth2zpa]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4419312/blog/4707857
边栏推荐
- C语言I博客作业03
- Judging whether paths intersect or not by leetcode
- Wechat nickname Emoji expression, special expression causes the list not to be displayed, export excel error report and other problems solved!
- Learn Scala if Else statement
- C language I blog assignment 03
- Sentry installation
- Sum up some useful functions
- Codeforce算法题 | 你能想出解法,让你的基友少氪金吗?
- Supervisor process management installation and use
- Macquarie Bank drives digital transformation with datastex enterprise (DSE)
猜你喜欢
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?
Blazor 准备好为企业服务了吗?
Hand tearing algorithm - handwritten singleton mode
你的主机中的软件中止了一个已建立的连接。解决方法
Wechat applet request reported 400 error @ requestbody failed to receive
The real-time display of CPU and memory utilization rate by Ubuntu
iOS 学习笔记二【cocopods安装使用和安装过程中遇到的问题及解决办法】【20160725更新】
SQL Server 2008R2 18456错误解决方案
The road of cloud computing: a free AWS cloud server
Adobe Prelude /Pl 2020软件安装包(附安装教程)
随机推荐
Basic operation of database
IOS learning note 2 [problems and solutions encountered during the installation and use of cocopods] [update 20160725]
ts流中的pcr与pts计算与逆运算
[solution] distributed timing task solution
你的主机中的软件中止了一个已建立的连接。解决方法
GET,POST,PUT,DELETE,OPTIONS用法与说明
Wechat applet request reported 400 error @ requestbody failed to receive
Introduction to ucgui
CPP (2) creating CPP project
Idea - the. IML file was not automatically generated by the project
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)
use Xunit.DependencyInjection Transformation test project
PerconaXtraDBCluster8.0 最详尽用法指南
Windows subsystem Ubuntu installation
SQL Server 2008R2 18456错误解决方案
解决RabbitMQ消息丢失与重复消费问题
Solve the problem of rabbitmq message loss and repeated consumption
在Ubuntu上体验最新版本EROFS
搜索引擎的日常挑战_4_外部异构资源 - 知乎
个人短网址生成平台 自定义域名、开启防红、统计访问量