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

bellcode / lesson12-1

  • 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
  • lesson12-1
  • diy.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    auto save · d6df9a9a
    BellCodeEditor committed 3 years ago
    d6df9a9a
diy.py 386 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
name=[]
while True:
    n=input('1查看;2添加;3删除;4修改')
    if n=='1':
        print(name)
    elif n=='2':
        a=input('添加名字:')
        name.append(a)
    elif n=='3':
        a=input('删除名字:')
        name.remove(a)
    elif n=='4':
        a=input('修改名字:')
        b=input('改成名字:')
        c=name.index(a)
        name[c]=b