In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.