Python Jobs-Multilevel menu

Source: Internet
Author: User

Practice Python Multi-level menu reading function, is actually the list or the dictionary of ITER

Functional Requirements:

  1. Run the program output first level menu

  2. Select a Level menu item, output Level Two menu, the same output level three menu

  3. The menu data is saved in the file

  4. Let the user choose whether or not to exit

  5. There is a function to return to the top level menu

Here is a simple version of:
By gradually iterating through the list, you can actually see that there are a lot of duplicate code. Like every time.
Iterative Menu_dict[choice]..

The Literary youth edition is actually the thing that has been reused for a long time, and then re-assigns it to men_dict after each selection.

Python Jobs-Multilevel menu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.