Question: Python programming : Store all of the lists in a dictionary named 'information', ID = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],

Python programming:

Store all of the lists in a dictionary named 'information', ID = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], first_name = ['Tim', 'Marco', 'Hans', 'steven', 'Robin', 'Wesley', 'Patrick', 'Ryan', 'Donny', 'Frenkie'], last_name = ['Jones', 'Harry', 'Anthony', 'Grant', 'Lee', 'James', 'Daniel', 'Henderson', 'Williams', 'Scott'], age = [27, 24, 18, 26, 33, 31, 19, 21, 37, 25]. The ID is the key, and the value is a nested dictionary. The keys in the nested dictionary are first_name, last_name, and age, with the corresponding values.

Example:

print(information['1'])

>>>{'1', {'first_name': 'Tim', 'last_name': 'Jones', 'age': 27 }}

print(information['10']['age'])

>>>25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!