In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the Python how to use the list list to achieve CRUD operation function related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe everyone in this Python how to use the list list to achieve CRUD operation function article will have a harvest, let's take a look.
The requirements are as follows:
1. Interface list
Welcome to user management system 1 add user 2 delete user 3 modify user 4 query user 5 exit
two。 Delete, modify, query, operate according to id
3. Items that are not deleted, modified or queried are given the corresponding hints, and the results of the operation are given as hints.
4. Initialize 3 users
5. The user has an attribute id,name,password, which uses three lists to save data.
The code is as follows:
# user management system # initialize 3 users ids = ['1 'root','abc123''] names = ['Zhang San','Li Si', 'Wang Wu'] pws = ['root','abc123'' '123456'] # create menu print ("= Welcome to user management system = =") print ("1 add user") print ("2 delete user") print ("3 modify user") print ("4 query user") print ("5 exit") type = int ("Please select:") while type > = 1 and type
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.