21
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following code?
d1 = {'a': 1}
d2 = {'b': 2, 'a': 9}
d1.update(d2)
print(d1)What is the output of the following code?
from collections import defaultdict
g = defaultdict(list)
g['a'].append(1)
print(dict(g))