Commit e4a250b0 by BellCodeEditor

save project

parent a5cb0387
Showing with 13 additions and 2 deletions
hero=['1','4','2','6','3','80']
name=9527
power=10086
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:])
\ No newline at end of file
a=['吕布'] a=['吕布']
b=['苹果','香蕉','西瓜','香蕉','刘备','关羽','张飞','桃子','香蕉'] b=['苹果','香蕉','西瓜','香蕉','刘备','关羽','张飞','桃子','香蕉']
b[4:7] print(b[4:7])
a.extend(b) a.extend(b[4:7])
print(a) 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