Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson2-2_DIY1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson2-2_DIY1
  • 1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · e14cb5cb
    BellCodeEditor committed 3 years ago
    e14cb5cb
1.py 251 Bytes
1 2 3 4 5 6 7 8 9
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)
        break
print(hero)