Dictionary Initialization as int from collections import defaultdict foo = defaultdict(int) foo[3] = 4 as list foo = defaultdict(list) foo[2].append(3) Iteration foo = defaultdict() for k,v in foo.items(): ...