当前位置:网站首页>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
边栏推荐
- Unparseable date: 'mon Aug 15 11:24:39 CST 2016', time format conversion exception
- 个人短网址生成平台 自定义域名、开启防红、统计访问量
- Windows下子系统Ubuntu安装
- The most detailed usage guide for perconaxtradbcluster8.0
- 什么你的电脑太渣?这几招包你搞定! (Win10优化教程)
- VC6兼容性及打开文件崩溃问题解决
- 接口
- Do you really understand the high concurrency?
- 解决RabbitMQ消息丢失与重复消费问题
- Sum up some useful functions
猜你喜欢

Brief history of computer

UCGUI简介

swiper 窗口宽度变化,页面宽度高度变化 导致自动滑动 解决方案

Astra: the future of Apache Cassandra is cloud native

Adobe Prelude / PL 2020 software installation package (with installation tutorial)

来自不同行业领域的50多个对象检测数据集

VC6 compatibility and open file crash resolution

ts流中的pcr与pts计算与逆运算

Face recognition: attack types and anti spoofing techniques

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?
随机推荐
VC6 compatibility and open file crash resolution
laravel8更新之速率限制改进
FORTRAN 77 reads some data from the file and uses the heron iteration formula to solve the problem
IOS learning note 2 [problems and solutions encountered during the installation and use of cocopods] [update 20160725]
云计算之路-出海记:整一台 aws 免费云服务器
Introduction to ucgui
ts流中的pcr与pts计算与逆运算
c# 表达式树(一)
UCGUI简介
Search and replace of sed
Basic knowledge of C + +
Blazor 准备好为企业服务了吗?
C语言I博客作业03
双向LSTM在时间序列异常值检测的应用
QT hybrid Python development technology: Python introduction, hybrid process and demo
Face recognition: attack types and anti spoofing techniques
搜索引擎的日常挑战_4_外部异构资源 - 知乎
C language I blog assignment 03
到底选openstack还是vmware?
Experience the latest version of erofs on Ubuntu