Using a very common utility in the standard library is to avoid reinventing the wheel is not "clean code"?
defaultdict is ubiquitous in modern python, and is far from a complicated concept to grasp.
defaultdict is ubiquitous in modern python, and is far from a complicated concept to grasp.
The difference between the examples is so trivial I'm not really sure why the parent comment felt compelled to complain.