python dictionary walkthrough welcome menu display 200 310

A user inputs an instruction corresponding to the print content

User instructions Display content
1 New users
2 All inquiries
3 Users looking for Charles
4 exit the program
  • Use an if statement to achieve functional
  • Use a dictionary to traverse realize the function

User inputs an instruction to start the function corresponding to

User instructions Display content
1 New users
2 All inquiries
3 Users looking for Charles
4 exit the program
  • A clear relationship with the entity identifier
  • Function is the identifier
  • Meaning identifier identifier points
  • You need to define the function before they can point to
Published 77 original articles · won praise 1 · views 1224

Guess you like

Origin blog.csdn.net/whalecode/article/details/104772028