1d = {1: "one", 2: "three"}
2d1 = {2: "two"}
3
4# updates the value of key 2
5d.update(d1)
6
7#Output
8{1: 'one', 2: 'two'}
1marks = {'Physics':67, 'Maths':87}
2internal_marks = {'Practical':48}
3
4marks.update(internal_marks)
5
6
7print(marks)
8
9# Output: {'Physics': 67, 'Maths': 87, 'Practical': 48}
1for project in projects:
2 project['complete'] = project['id'] in (complete['id'] for complete in completes)
3