当前位置:网站首页>enumrate的start属性的坑
enumrate的start属性的坑
2022-07-02 07:44:00 【lanmy_dl】
enumrate的start属性
是这样的,要两个for循环遍历,取出数据,并且第二个for循环可以在第一个之后取节省处理了的时间,我用了enumerate,结果以为start属性和我想的不一样start属性说明
for index1,((xx1, yy1), rr1, grbb1) in enumerate(center): # 从第一个点开始
for index2,((xx2, yy2), rr2, grbb2) in enumerate(center,start=index1+1):
###code
即使下标变成1,还是和第0个相同
原来只是改变开始值的下标,还是从头给你遍历,这样下标虽然记录的变了,但是数据还是从头取。。。
还是老实用for循环把,突然懂了一般训练代码里面有时候用两个for循环
for index1 in range(len(center)):
(xx1, yy1), rr1, grbb1 = center[index1]
for index2 in range(index+1,len(center)):
(xx2, yy2), rr2, grbb2) = center[index2]
###code
边栏推荐
- Creation and use of unified links in Huawei applinking
- Uncover the secrets of Huawei application market application statistics
- Matlab processing of distance measurement of experimental electron microscope
- Thanos Receiver
- Jsp webshell Free from killing - The Foundation of JSP
- Nodejs+express+mysql simple blog building
- Huawei game failed to initialize init with error code 907135000
- [quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
- MySQL lethal serial question 4 -- are you familiar with MySQL logs?
- flink二開,實現了個 batch lookup join(附源碼)
猜你喜欢

Use Huawei performance management service to configure the sampling rate on demand

Implement custom drawer component in quick application

One trick to quickly realize custom application titlebar

Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
![[play with FPGA learning 4 in simple terms ----- talk about state machine design]](/img/e0/95f8b8c5116c57455e54ad12372f12.png)
[play with FPGA learning 4 in simple terms ----- talk about state machine design]

How to implement tabbar title bar with list component
![[applinking practical case] share in app pictures through applinking](/img/12/5616f1fa55387b81e25e55a98022b9.png)
[applinking practical case] share in app pictures through applinking
![[quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched](/img/5c/b0030fd5fbc07eb94013f2699c2a04.png)
[quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched

二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)

The most detailed MySQL installation tutorial
随机推荐
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
【ARK UI】HarmonyOS ETS的启动页的实现
实验电镜距离测量之Matlab处理
How does the whole network display IP ownership?
Logu p3398 hamster looks for sugar (double LCA on the tree to judge whether the two paths in the tree intersect)
[play with FPGA learning 5 in simple terms ----- reset design]
三.芯片啟動和時鐘系統
二叉树专题--AcWing 18. 重建二叉树(利用前、中序遍历,构建二叉树)
Why does LabVIEW lose precision in floating point numbers
首份中国企业敏捷实践白皮书发布| 附完整下载
Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
TIPC Getting Started6
[quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
计算序列之和
Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
STM32单片机编程学习
学习open62541 --- [66] UA_String的生成方法
LabVIEW为什么浮点数会丢失精度
全网显示 IP 归属地,是怎么实现的?
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)