Commit cc496be0 by BellCodeEditor

save project

parent 97345632
Showing with 11 additions and 10 deletions
name=input("输入名字")
power=input("输入力量")
hero=['wdwd',30,'ghwdgh',37,'erfgerf',52,'fewfwer',89,'cvbcb',98]
for i in range(len(hero)):
if i%2==1 and power<hero[i]:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero)
\ No newline at end of file
sa=["关羽","刘备","张飞"]
sa[0]="张飞"
sa[2]="关羽"
print(sa)
sa.remove('刘备')
sa.pop(0)
print(sa)
sa=['张飞']
l=['刘备','关羽']
sa.extend(l)
\ 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