Commit f80874c7 by BellCodeEditor

save project

parent 8497f744
Showing with 6 additions and 2 deletions
...@@ -4,6 +4,9 @@ name='刘华强' ...@@ -4,6 +4,9 @@ name='刘华强'
power=6 power=6
hero=['赵云',30,'丁真',5555555555555,'孙悟空',208200114514,'王霸但',8888888888888,'次 爱虚鲲'',1145141145142.5] hero=['赵云',30,'丁真',5555555555555,'孙悟空',208200114514,'王霸但',8888888888888,'次 爱虚鲲'',1145141145142.5]
# 自动排序 # 自动排序
for i in rang(): for i in rang(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero) 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