From af6e36e9e5f1442dd96264adaa34bf938b1b4fc3 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 17 Oct 2021 16:02:20 +0800 Subject: [PATCH] save project --- diy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/diy.py b/diy.py index a527e52..b0acdae 100644 --- a/diy.py +++ b/diy.py @@ -8,6 +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[:]) -- libgit2 0.25.0