Commit 01055c75 by BellCodeEditor

save project

parent 7d78c143
Showing with 5 additions and 15 deletions
name=input("请输入名字:")
power=int(input("请输入臂力:"))
hero=["赵一",30,"丁一",37,"孙武",52,"55",89,"99",98]
if power>=hero[len(hero)-1]:
hero.append(name)
hero.append(power)
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)
print(hero[len(hero)-6:])
\ No newline at end of file
a=['吕布']
b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
a.extend(b[2:5])
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