Commit 50606a6d by BellCodeEditor

save project

parent 4327f189
Showing with 15 additions and 4 deletions
a=['吕布']
b=["lkj","lkj","张飞","关羽","刘备"]
a.extent([2:4])
print(a)
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
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