当前位置:网站首页>Pit of the start attribute of enumrate
Pit of the start attribute of enumrate
2022-07-02 11:12:00 【lanmy_ dl】
enumrate Of start attribute
That's true , Two, please for Loop traversal , Take out the data , And the second for The loop can be taken after the first one to save processing time , I used it enumerate, It turns out that start The attribute is different from what I think start Attribute specification
for index1,((xx1, yy1), rr1, grbb1) in enumerate(center): # From the first point
for index2,((xx2, yy2), rr2, grbb2) in enumerate(center,start=index1+1):
###code
Even if the subscript becomes 1, Or with the 0 Same
It turned out that it was just changing the subscript of the starting value , Or I'll go through it from the beginning , Although the subscript record has changed , But the data is still taken from scratch ...
It's better to be honest for Loop handle , Suddenly I understand that there are sometimes two in the general training code for loop
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
边栏推荐
- The first white paper on agile practice in Chinese enterprises was released | complete download is attached
- 首份中国企业敏捷实践白皮书发布| 附完整下载
- 每月1号开始计算当月工作日
- OpenMLDB Meetup No.4 会议纪要
- MTK full dump抓取
- Appgallery connect scenario development practice - image storage and sharing
- [ark UI] implementation of the startup page of harmonios ETS
- [in simple terms, play with FPGA learning 3 ----- basic grammar]
- [AI application] Hikvision ivms-4200 software installation
- 二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
猜你喜欢
Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?
[in simple terms, play with FPGA learning 3 ----- basic grammar]
TIPC Service and Topology Tracking4
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
QT学习日记7——QMainWindow
Nodejs+express+mysql simple blog building
一招快速实现自定义快应用titlebar
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
使用华为性能管理服务,按需配置采样率
随机推荐
Array splitting (regular thinking
From Read and save in bag file Jpg pictures and PCD point cloud
QT learning diary 8 - resource file addition
二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)
TIPC 寻址2
STM32单片机编程学习
Complement (Mathematical Simulation
【深入浅出玩转FPGA学习5-----复位设计】
Oracle notes
TIPC Service and Topology Tracking4
sqlite 修改列类型
Huawei game failed to initialize init with error code 907135000
Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
TIPC introduction 1
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
The first white paper on agile practice in Chinese enterprises was released | complete download is attached
[ark UI] implementation of the startup page of harmonios ETS
TIPC messaging3
MySQL lethal serial question 4 -- are you familiar with MySQL logs?
V2X-Sim数据集(上海交大&纽约大学)