当前位置:网站首页>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
边栏推荐
- Learn open62541 -- [66] UA_ Generation method of string
- [ark UI] implementation of the startup page of harmonios ETS
- Luogu p1892 [boi2003] Gang (and search for variant anti set)
- Array splitting (regular thinking
- Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
- 函数式接口和方法引用
- 华为AppLinking中统一链接的创建和使用
- TIPC protocol
- 洛谷 P3398 仓鼠找 sugar(树上倍增 lca 判断树中两条路径是否相交 结论)
- Uncover the secrets of Huawei application market application statistics
猜你喜欢

III Chip startup and clock system

Overview of integrated learning

2022爱分析· 国央企数字化厂商全景报告

JSP webshell free -- webshell free

Thanos Receiver

Special topic of binary tree -- acwing 1589 Building binary search tree

二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)

Flink two Open, implement Batch Lookup join (attached source)

TIPC Service and Topology Tracking4

Verilog 和VHDL有符号数和无符号数相关运算
随机推荐
Common methods of JS array
华为快应用中如何实现同时传递事件对象和自定义参数
static 函数中的静态变量
QT学习日记8——资源文件添加
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
TIPC introduction 1
【AI应用】海康威视iVMS-4200软件安装
TIPC Cluster5
V2x SIM dataset (Shanghai Jiaotong University & New York University)
One trick to quickly realize custom application titlebar
二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
Iii. Système de démarrage et d'horloge à puce
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
[play with FPGA learning 5 in simple terms ----- reset design]
Point cloud projection picture
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)
二叉树专题--AcWing 3384. 二叉树遍历(已知先序遍历 边建树 边输出中序遍历)