From 0b2402e9890ec6bbe6b05deb5ee3c8c1ddd06451 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 6 Nov 2021 11:50:08 +0800 Subject: [PATCH] save project --- diy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diy.py b/diy.py index 2348563..a504205 100644 --- a/diy.py +++ b/diy.py @@ -8,7 +8,11 @@ # 归档处 hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] for i in range(len(hero)): - + if i%2==1 and hero[i]>=power: + hero.insert(i-1,name) + hero.insert(i,power) + break +print(hero[-6:]) -- libgit2 0.25.0