Commit d067a5ee by BellCodeEditor

save project

parent f610bb61
Showing with 19 additions and 11 deletions
a=["华雄"]
c=["颜良","文丑"]
a.extend(c)
print(a)
\ No newline at end of file
a=["吕布"]
c=["袁术","公","刘备","关羽","张飞","曹操"]
print(a+c[2:5])
\ No newline at end of file
name=input("你叫啥")
power=input("zhi")
hero=["1",30,"2",31,"3",60,"4",70]
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[-6:])
\ No newline at end of file
bro1="关羽"
bro2="刘备"
bro3="张飞"
bros=["刘备","关羽","张飞"]
bro1=["关羽",160,8.5]
bro2=["刘备",161,9.1]
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[1]="刘备"
print(bros)
\ 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