LogiQuest
Back to Dictionaries
21

What is the output of the following code?

from collections import defaultdict
g = defaultdict(list)
g['a'].append(1)
print(dict(g))
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.