Skip to content
Open navbar menu
Sign UpLog In
Profile icon

Sakura Kimiko

shared a Post
4 years ago
Adding an ID to student name list
Hello I am trying the following code and to do the follows in PYTHON CODE I want to start adding student by starting a blank list along with auto g
You might want to use an SQL database to achieve this – they come with handy features that make life easier and are highly performant. If you want to use a python list then whenever a new student is created an ID could be provisioned using student_list = [ {id: 1, name: 'name1', email: '[email protected]'}, # Extra fields can be added as is necessary {id: 2, name: 'name2, email: '[email protected]'} And so on ... ] You can do a linear search to find the student. userid=int(input(""Your user id4 years ago