Commit 53a5f379 by BellCodeEditor

save project

parent 2e562b14
Showing with 5 additions and 1 deletions
...@@ -13,7 +13,8 @@ hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] ...@@ -13,7 +13,8 @@ hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100]
for i in range(len(hero)): for i in range(len(hero)):
if i%2==1 and hero[i]>=a: if i%2==1 and hero[i]>=a:
hero.insert(i-1,name) hero.insert(i-1,name)
hero.insert(i-1,name1) hero.insert(i,name1)
break
print(hero[len(hero)-6:len(hero)+1]) print(hero[len(hero)-6:len(hero)+1])
......
sdudents=["悟空","小贝","八戒","波奇"]
sdudents.pop(2)
sdudents.append("诺依")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment