Get Mystery Box with random crypto!

#Python tip: Be beware of default_factory argument in defaultd | Nikita Shpilevoy | About IT, AI, etc

#Python tip: Be beware of default_factory argument in defaultdict constructor. You have a risk of accidental dict mutation during lookups.

Example:
>>> d = defaultdict(list)
>>> print(d['x'])
[]
>>> print(d.keys())
dict_keys(['x'])

Whoops, we are created some key here.

Consider changing back to an ordinary dict. It is a very cheap operation without recomputing hash values. The only slow part is the interpreter needs to update all references.

Also, for whatever reason, lookup in dict() works a little faster than in defaultdict.