Commit 4bf88759 by BellCodeEditor

save project

parent c789d63e
Showing with 12 additions and 2 deletions
bros=["刘备","关羽","张飞"] bros=["刘备","关羽","张飞"]
bros[0]="关羽" bros[0]="关羽"
bros[1]="刘备" bros[1]="刘备"
bros[2]="张飞" bros[2]="张飞"
\ No newline at end of file
name="吕布"
power=66
hero=["袁术",30,"公孙瓒",37,"关羽",52,"张飞",89,"刘备",98,]
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)
\ 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