Commit 0ab6217b by BellCodeEditor

save project

parent 25e7bdcf
Showing with 12 additions and 1 deletions
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# 省略繁杂情节,刘关张三人一起冲入战场,围攻吕布: # 省略繁杂情节,刘关张三人一起冲入战场,围攻吕布:
a=['吕布'] a=['吕布']
b=['袁术','公孙瓒','关羽','张飞','刘备','曹操'] b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
c=(b[2:5]) c=b[2:5]
print(c) print(c)
a.extend(c) a.extend(c)
print(a) print(a)
\ No newline at end of file
a=['袁术',22,'公孙瓒',33,'关羽',44,'张飞',55,'刘备',66,'曹操',77]
name='路人甲'
power=60
for i in range(len(a)):
if i%2==1 and power<=a[i]:
a.insert(i-1,name)
a.insert(i,power)
break
print(a)
\ No newline at end of file
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