Commit 79da66bd by BellCodeEditor

save project

parent 981eefca
Showing with 31 additions and 2 deletions
......@@ -8,4 +8,33 @@ print(bros)
b=['袁术','夏侯惇','曹操','关羽']
#b.pop(3)
b.remove("关羽")
\ No newline at end of file
b.remove("关羽")
print(b)
a=['华雄']
#a.insert(1,'关羽')
a.append('关羽')
print(a)
a=['华雄']
c=['颜良','文丑']
a.extend(c)
print(a)
a=['吕布']
b=['关羽','公孙离','老六','老七','老八']
#a.append(b)
a.extend(b[2:5])
print(a)
name=input('你叫啥名啊?')
power=int(input('你臂力多少啊?'))
name='蔡徐坤'
power=66
hero=['一',30,'二',37,'三',89,'四',98,'五',100,'六',130]
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