Commit 5c4058ff by BellCodeEditor

auto save

parent 87be3438
Showing with 15 additions and 0 deletions
name=input('你叫什么名字')
power=int(input('你的臂力值是多少'))
list_hero=['猴三',10,'猴五',20,'猴七',30,'猴队长',60]
for i in range(len(list_hero)):
if i%2==1 and list_hero[i]>=power:
list_hero.insrt(i-1,name)
list_hero.insrt(i,power)
break
print(list_hero)
dict_hero={'猴三':10,'猴五':20,'猴七':30,'猴队长':60}
dict_hero['猴七']=32
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