Commit 9637684a by BellCodeEditor

auto save

parent b81ffb89
Showing with 6 additions and 5 deletions
...@@ -4,9 +4,9 @@ name='刘强' ...@@ -4,9 +4,9 @@ name='刘强'
power=66 power=66
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
# 自动排序 # 自动排序
hero.append(name) for i in range(1,len(hero),2):
hero.append(power) if hero[i]>=power:
hero.append(name)
hero.append(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