1IDs = ['emp1','emp2','emp3']
2
3EmpInfo = [{'name': 'Bob', 'job': 'Mgr'},
4 {'name': 'Kim', 'job': 'Dev'},
5 {'name': 'Sam', 'job': 'Dev'}]
6
7D = dict(zip(IDs, EmpInfo))
8
9print(D)
10# Prints {'emp1': {'name': 'Bob', 'job': 'Mgr'},
11# 'emp2': {'name': 'Kim', 'job': 'Dev'},
12# 'emp3': {'name': 'Sam', 'job': 'Dev'}}
1people = {1: {'name': {'John': 'hey', 'man':'hello'} 'age': '27', 'sex': 'Male'},
2 2: {'name': 'Marie', 'age': '22', 'sex': 'Female'}}
3
4print(people[1]['name']['John'])
5print(people[1]['age'])
6print(people[1]['sex'])
1>>> [val.get('phone') for val in people.values()]
2['4563', '9102', '2341']
3