Commit 49e8b38a by BellCodeEditor

save project

parent e2088c2e
Showing with 3 additions and 109 deletions
a=['华雄']
a.append('颜良')
a.append('文丑')
print(a)
a=['华雄']
b=['颜良','文丑']
a.extend(b)
print(a)
name='刘强'
power=66
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
print(hero[8:])
\ No newline at end of file
dict_hero={'候三'10,'候一'21,'候五'22,'候队长'29,'候七'30}
print(dict_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